|
I have added (to the working library) GUID for CLSID_IMGSinkFilter to uuids.h header using this :
// 1d4d3676-96ef-4cd7-a3d7-07fac0d0c585
OUR_GUID_ENTRY(CLSID_IMGSinkFilter,
0x1d4d3676, 0x96ef, 0x4cd7, 0xa3, 0xd7, 0x07, 0xfa, 0xc0, 0xd0, 0xc5, 0x85)
This GUID will be used in static library.
The library compiles and builds, by itself.
The main application complies but it fails to link to the GUID with following error:
VidCapLib.lib(_Graph.obj) : error LNK2001: unresolved external symbol _CLSID_IMGSinkFilter
Debug/TCC_MDI.exe : fatal error LNK1120: 1 unresolved externals
So the VidCapLib.lib is not complete.
What did I missed?
Any help as always will be appreciated.
Cheers
Vaclav
|
|
|
|
|
In the header file you write this code -
#include <guiddef.h>
DEFINE_GUID(CLSID_IMGSinkFilter, 0x1d4d3676, 0x96ef, 0x4cd7, 0xa3, 0xd7, 0x07, 0xfa, 0xc0, 0xd0, 0xc5, 0x85);
In the source file where you're using CLSID_IMGSinkFilter , include the initguid.h header file.
This step is not needed for newer compilers.
«_Superman_»
I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++) (October 2009 - September 2013) Polymorphism in C
|
|
|
|
|
Thanks, works as advertized!
Now I need to get rid of some DirectShow multiple defintions, no problem.
BTW what class(es) did you take to have this much knowledge?
Or are you just a old as I am, but much smarter?
Thanks again and if you ever in Houston, I owe you a beer.
Vaclav
|
|
|
|
|
Spoke too soon.
My attempt to stop multiple defintions run into a snag.
I added a "standard" #ifndef / #define flag/ switch to uuids.h - the one I have modified.
I make sure I use that one.
The "problem" is with plain / non modified DirectShow BaseClasses WXDebug.cpp file.
It compiler get wild in this macro :
/* Stuff for printing out our GUID names */
GUID_STRING_ENTRY g_GuidNames[] = {
#define OUR_GUID_ENTRY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
{ #name, { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } },
#include <uuids.h>
};
D:\00\0 SDK\DIrectShow 8.1 SDK\samples\Multimedia\DirectShow\BaseClasses\wxdebug.cpp(936) : error C2059: syntax error : '}'
D:\00\0 SDK\DIrectShow 8.1 SDK\samples\Multimedia\DirectShow\BaseClasses\wxdebug.cpp(936) : error C2143: syntax error : missing ';' before '}'
D:\00\0 SDK\DIrectShow 8.1 SDK\samples\Multimedia\DirectShow\BaseClasses\wxdebug.cpp(936) : error C2143: syntax error : missing ';' before '}'
D:\00\0 SDK\DIrectShow 8.1 SDK\samples\Multimedia\DirectShow\BaseClasses\wxdebug.cpp(939) : error C2070: illegal sizeof operand
Error executing cl.exe.
Apparently the #include <uuids.h> header is no longer OK in the GUID_STRING_ENTRY macro.
I have no clue how to modify this macro and keep the DirectShow debug happy.
Not realy sure if I need the debug, so I may just skip it from compiling if things don't fall apart more.
|
|
|
|
|
Didn't take too many classes in programming.
Mostly self learnt, like most of the people here.
It's probably 16 years of doing the same thing that's helping.
I also retain all the test code that I ever wrote with proper book keeping.
So that becomes the perfect reference material.
Was in Dallas for a couple of days last month.
Never been to Houston except during transit a couple of times.
Will ping you the next time I'm around and get that beer.
If you're coming to India any time, please get in touch.
«_Superman_»
I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++) (October 2009 - September 2013) Polymorphism in C
|
|
|
|
|
HI all
I'm trying to implement a software that create backup files. The backup are created until a maximum of backup files defined, in my case are 10 files.
After that I get the oldest backup file and overwrite. But I have somes question about what use, I tried use Circular buffer but I don't know how to use for files.
Anybody can help me.
Thank you.
|
|
|
|
|
Your circular buffer may contain, for instance the file names, e.g.
fname[0]
fname[1]
...
fname[9]
With a next variable holding next item in the circular buffer. For instance, if next == 4 then the file having fname[4] (if any) is deleted and fname[4] is assigned with the name of a newly created file. Then next is incremented (and set to zero if greater than 9 ).
Hope it makes sense.
Veni, vidi, vici.
|
|
|
|
|
Hello there,
I have a MFC app developed in VS 2012. Inside couple of worker threads it's constantly doing bunch of things.
Now if i start the app and then open the Task Manager and look at the Physical Memory for my app, it's constantly incriminating until i close the app.
I didn't try to run the app for more than an hour yet, as i am not sure whether that will screw up other app's in the system.
What does this increase in Physical Memory mean? Is this a problem?
If yes, how can i fix that?
Thanks in advance.
|
|
|
|
|
Did you look at the Output window to see if there are memory leaks as I had suggested?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Yes, i don't see any memory leak messages in the Output window.
|
|
|
|
|
OK, I have another suggestion. You might want to check if the program is leaking handles.
In Task Manager, select the "Handles" column to be displayed for all processes. Watch the number to see if it increases without limit. If so, then you'll have to see where you are allocating Windows handles and not closing them with CloseHandle() .
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Don Guy wrote: I didn't try to run the app for more than an hour yet, as i am not sure whether that will screw up other app's in the system. What does this increase in Physical Memory mean? Is this a problem? If yes, how can i fix that? See here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Hello all, this is my first post, so I'll start off by saying that I began programming about a month and a half ago, and being a "math person" it was mostly intuitive to me. So I would classify myslef somewhere in-between beginner and average.
Anyway, My English teacher brought up a "Game" where you pick two words. And using dictionary definitions of one word, you have to pick a word in the definition, go to it, find its definition, and so on and so forth until you finally reach the second word you picked.
For example: Pick the words Finesse and Aggregate
Using Dictionary.com (Just using the most convenient resource) the definition of Finesse is Extreme delicacy or subtlety in action, performance, skill, discrimination, taste.
So I go to extreme, and it is defined as Of a character or kind farthest removed from the ordinary or average: extreme measures.
So I go to Character, which is defined as The aggregate of features and traits that form the individual nature of some person or thing.
And Thus I have reached Aggregate!
My point in all this is that I would like to write a program do be able to play the game.
This could often take a long time, but I hope you see the point of the "program in my head." The goal of the program would be to find and display the shortest possible path from one word to another.
My problem is that I HAVE NO IDEA HOW TO START THIS HELP. Or at least that's how I feel. If anyone can help me in the slightest, it would be great! Also I feel the program would be simpler if It were written using synonyms and a thesaurus, and if you think there is a better programming language to write this in, feel free to suggest it!
Thanks in advance!
|
|
|
|
|
I'd break it down into units/chunks of work, each unit/chunk exploring one small aspect
your first one may be to be able to use a html query to a website like http://dictionary-api.cambridge.org/index.php/help/resources#c#[^] to get a definition for a word and display it - could be console or forms based
Once you know how the data comes back, you then have to be able to parse/render it into a form you can use for matching - and possibly store it in memory
btw, I showed the c# api for that dictionary - 'better programming language' ? I don't know - there's this big thing about abstraction and using the right language/tool for the job - sometimes like this dictionary api, you may not find an api for your language - that doesn't stop you from having a mixed component approach - I think c# would also be ok for this project - it'll just take you longer to do 'this bit' in c++ since they don't supply an api - so you'd have to model the java or Objective-C one.
So, I'd start in an 'agile' frame of mind, small steps, refined, combined - I don't think the big issue here is getting the dictionary definitions, its the matching - so you may need to think about storing dictionary results in memory or some other appropriate form so you can develop an algorithm for matching and/or retrieving more dictionary entries - and also 'backtracking' if you come to a dead end
|
|
|
|
|
So on my quest, I downloaded WordWeb, to see if I could dissect it's files and source code to give me a hint or a database to use, but I couldn't find a way to accomplish this on Ubuntu.
So my question is, could I somehow tell my program to use word web, and find the path between two words? I'm not asking you to write the algorithm for me, just wondering if there is a way to tell my program to run an executable file and use it, while the code is running. Thanks!
(Also I plan to use linux terminal as the interface)
|
|
|
|
|
yikes - I guess this is what you meant by posting on multiple forums which is cough, a no no ... but as it is, I assumed you were on windows - if I had to do it this way in windows, I would create a process with a hidden window perhaps to run Word Web - but on Ubuntu ? I guessing (depending on what language you are using) there's a way of doing it, but I'd have to 'JFGI' .. [J]ust [F]arken [G]oogle [I]t
Even on Ubuntu, using something like Perl would work with that dictionary I suggested - or any other language capable of sending a HTTP request to a server - I wouldn't use the 'start another program' method unless there was absolutely no other way
|
|
|
|
|
haha sorry, I just wanted the answer asap... Okay thanks for your help
|
|
|
|
|
Also In a way that the user can't notice word web working in the background
|
|
|
|
|
(My internet connection is a bit 'flaky')
I'd do some test results on getting dictionary results, look at the results, print them out etc and do a lot of sketches on paper on how to match them
Keep a notebook - write down your ideas, what works, what hasn't, so you can go back a step if you need - or show mates/the teacher if you need help on 'thought processes'
you said you didn't know how to start ? you already have - you've looked at a task and started breaking it down into do-able steps - that's the way its done in the real world too (along with study, research, persererance ...)
have fun
|
|
|
|
|
Thank you thank you! No one else would reply to me on any other forum's, You are awesome! You beautiful person you
|
|
|
|
|
Craig McRae wrote: The goal of the program would be to find and display the shortest possible path from one word to another.
There is a whole area of math devoted to the study of this.
Craig McRae wrote: So I would classify myslef somewhere in-between beginner and average.
Excluding the above I would expect that you are going to get more out of this just by doing it yourself. There is a lot of 'ideas' to be explored, for example
- Where do you get the dictionary
- Can there be more than one dictionary
- Is it legal to use the dictionary
- How to access the dictionary
- How do you make sure it doesn't take 'too long'.
|
|
|
|
|
We have a modern name for this game its call "the six degrees of Kevin Bacon"
You will find the background to the game by a simple google search that you can link Kevin Bacon to any other actor/actress in Holywood by no more than six films they have all acted in.
You will also find extensive lists on computer programming student assignments of how to program it and strategies as it is quite a common teaching game.
|
|
|
|
|
I am assigning double like this
double i = 3.34;
am getting value into i is 3.3399999999999
if i assign
double j = 6.24;
am getting value intio j is 6.240000000002
any reason?
|
|
|
|
|
|
Floating point numbers used by computers can be only rational (have a limited number of digits). When storing irrational numbers, the stored value must be rounded. Numbers are also stored internally with base 2. So not all decimal numbers (base 10) can be represented as identical base 2 numbers (while the decimal number is rational, the converted base 2 number may be irrational).
See the section 'Representable numbers, conversion and rounding' in the Floating point[^] Wikipedia article for a more detailed explanation.
|
|
|
|
|