|
I don't seem to have a whole lot of success getting any feedback on the COM forum, so I thought I'd try it here instead.
Here's the question: how do I find out which CLSID was used to create a COM object (as an argument to CoCreateInstance ), assuming I only have a pointer to that object and the object doesn't support IProvideClassInfo ?
Here's a bit of background: I am trying to add filters to a DirectShow filter graph, and the graph itself is quite capable of creating additional filters under the covers. Once created, these filter objects can be enumerated, which gives me pointers to them. What I need to know, though, is what kind of filters were created. BTW you don't really need to understand this part, the point is that I know nothing about the object except for the pointer itself.
Thanks,
M.C.
|
|
|
|
|
My one of class path is C:\OpenH323\Lib
I want to set above path as PATH Environment Variable in Visual C++.
Can any body help me please.
|
|
|
|
|
On the Visual Studio IDE Menu Tools/Options you can set multiple folders for library files.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
I am using Visual C++6. Can u tell me clearly that where it is? & How do I set My calss Path as "PATH environment variable".
|
|
|
|
|
Use function
BOOL SetEnvironmentVariable(
LPCTSTR lpName,
LPCTSTR lpValue
);
defined in winbase.h
|
|
|
|
|
i have finished my program i want to write a install program to let other people use mine ,but before i have never written ,please give me some instructions .
|
|
|
|
|
check out the many installer maker programs available ... they make life very easy
"there is no spoon" biz stuff about me
|
|
|
|
|
|
I use InnoSetup http://www.jrsoftware.org/isdl.php[^]
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
Having the process ID or HANDLE of a particular process, is there a way to find out its main window(or enum through all windows those were created by that process)? Thank you.
|
|
|
|
|
Ok i am new to answering question but i think your asking if you have a handle can you find out whether it is a child and then get the main window. If I am right then use:
BOOL IsChild(HWND hwndParent, HWND hWnd);
MSDN Library Lookup for IsChild
Ok so now you have checked your handle and its a child. Now you use:
HWND GetParent( HWND hWnd );
MSDN Lib: GetParent
I hope this helps
Discovery consist of seeing what everybody has seen and thinking what nobody has thought -- Albert Szent-Györgyi
Name the greatest of all the inventors: accident --Mark Twain
|
|
|
|
|
Hi,
I am having a csrollview where some data is being rendered. I want this data to be printed..I am unable to find anything on it.. can anyone help me out.. there is also a small problem.. like I have the vertical and horizontal scrollbars attched to the same.. but the vertical scrollbar is not working the way it should.. I mean if i drag the bar by mouse it either goes up (max) or below (min). I want to drag it by mouse and remain there where i leave.. Hope that both can be solved.. Looking forward to a solution from you people. Thanks a lot in advance..
Regards,
Himanshu
|
|
|
|
|
I'm using Visual Studio .NET, openGL and SDL for a program, I got this errors and I dont know what I'm doing wrong...
I folowed this instructions (I just dont know how to use cygwin - see warning in the page):
http://www.splike.com/howtos/sdl_visual_studio.html
here are some of the errors:
TrCarla error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
TrCarla error LNK2001: unresolved external symbol "public: __thiscall exception::exception(class exception const &)" (??0exception@@QAE@ABV0@@Z)
TrCarla error LNK2001: unresolved external symbol "public: virtual __thiscall exception::~exception(void)" (??1exception@@UAE@XZ)
TrCarla error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)
TrCarla error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z)
TrCarla error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z)
TrCarla error LNK2001: unresolved external symbol @_RTC_CheckStackVars@8
TrCarla error LNK2001: unresolved external symbol @_RTC_CheckStackVars@8
TrCarla error LNK2001: unresolved external symbol @_RTC_CheckStackVars@8
TrCarla error LNK2001: unresolved external symbol ___CxxFrameHandler
TrCarla error LNK2001: unresolved external symbol ___CxxFrameHandler
TrCarla error LNK2001: unresolved external symbol ___CxxFrameHandler
TrCarla error LNK2001: unresolved external symbol __except_list
TrCarla error LNK2001: unresolved external symbol __except_list
TrCarla error LNK2001: unresolved external symbol __fltused
TrCarla error LNK2001: unresolved external symbol __fltused
TrCarla error LNK2001: unresolved external symbol __fltused
TrCarla error LNK2001: unresolved external symbol __fltused
TrCarla error LNK2001: unresolved external symbol __purecall
TrCarla error LNK2001: unresolved external symbol __purecall
TrCarla error LNK2001: unresolved external symbol __RTC_CheckEsp
TrCarla error LNK2001: unresolved external symbol __RTC_CheckEsp
TrCarla error LNK2001: unresolved external symbol __RTC_CheckEsp
TrCarla error LNK2001: unresolved external symbol __RTC_InitBase
TrCarla error LNK2001: unresolved external symbol __RTC_InitBase
TrCarla error LNK2001: unresolved external symbol __RTC_InitBase
TrCarla error LNK2001: unresolved external symbol __RTC_InitBase
TrCarla error LNK2001: unresolved external symbol __RTC_Shutdown
TrCarla error LNK2001: unresolved external symbol __RTC_Shutdown
TrCarla error LNK2001: unresolved external symbol __RTC_Shutdown
TrCarla error LNK2001: unresolved external symbol __RTC_Shutdown
TrCarla error LNK2001: unresolved external symbol _exit
TrCarla error LNK2001: unresolved external symbol _mainCRTStartup
TrCarla error LNK2019: unresolved external symbol "public: __thiscall
.....
TrCarla fatal error LNK1120: 42 unresolved externals
thanks in advance
Leo
|
|
|
|
|
It looks like you missed to add lib file to your settings.
|
|
|
|
|
Can be it, since I'm not using the default libraries... But I just dont know witch ones to add...
Leo
|
|
|
|
|
I have a function that returns a char* and would like to know which way to handle this as to avoid a leak.
If the function were in this format
char* Function(void)
{
char *szString = new char[50];
return szString;
}
And was called like so:
char *szBuffer = Function();
would deleting szBuffer like so:
delete szBuffer
effectively erase the allocated memory?
|
|
|
|
|
You need to call delete this way
<br />
delete [] szBuffer;<br />
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
I can do it too with delete(szBuffer), right?
|
|
|
|
|
Thanks for the reply but a subquestion. Aren't the brackets supposed to be placed after delete only in case of multidimensional array?
and if not, does this mean I have memory leaks all over my code when I have used new and delete directly? (...oh god no!!!)
eg. char *szString = new char[20]; delete szString
Or does this apply solely because it was returned from a function?
|
|
|
|
|
hmmm, I just realized that ommitting the brackets only delets the first element...I have a lot of search/replacing to do!!!!
Thanks for the help
|
|
|
|
|
Actualy ommitting the brackets does free the memory, but only calls that destructor for the first object in the array. The brackets tells delete to call the destructor of every item in the array. Therefor, for basic types you could get away with not using the brackets (not recommened).
If you are creating an array of objects that also allocate memory for there own use, then you must use the brackets so that there destructors will be called inorder for them to clean up after themselfs (a.k.a. free any memory they allocated).
INTP
|
|
|
|
|
For multidimensional array like below
<br />
int *pSomething = new int [2][2];<br />
the clean up codes will be
<br />
delete [] [] pSomething;<br />
I am not sure if
<br />
char *szString = new char[20]; delete szString<br /> \
[MODIFIED]
will cause a memory leak to your program
[/MODIFIED]
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Marshall Cline's FAQ is a great resource for looking things up C++
C++ FAQ
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
I CANT PLAY COUNTER STRIKE CUS OF VISUAL C++ :S:S:S:S:S:S
|
|
|
|
|
Congratulations. You are now officially the owner of the most stupid, pathetic, ridiculous, useless, worthless pile-of-crap post on this message board.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|