Click here to Skip to main content
15,908,264 members
Home / Discussions / COM
   

COM

 
GeneralRe: creating a com component from an IDL file Pin
vista274-Nov-04 16:24
vista274-Nov-04 16:24 
GeneralRe: creating a com component from an IDL file Pin
Christian Graus4-Nov-04 17:18
protectorChristian Graus4-Nov-04 17:18 
GeneralRe: creating a com component from an IDL file Pin
vista274-Nov-04 17:26
vista274-Nov-04 17:26 
GeneralRe: creating a com component from an IDL file Pin
ThatsAlok4-Nov-04 18:30
ThatsAlok4-Nov-04 18:30 
GeneralRe: creating a com component from an IDL file Pin
vikramlinux5-Nov-04 0:23
vikramlinux5-Nov-04 0:23 
GeneralWMFormat SDK problem while read a .wmv Pin
ytod3-Nov-04 22:40
ytod3-Nov-04 22:40 
GeneralAbout Runtime and Developer Component Pin
ThatsAlok3-Nov-04 20:30
ThatsAlok3-Nov-04 20:30 
GeneralRe: About Runtime and Developer Component Pin
Sir Garence15-Nov-04 5:44
sussSir Garence15-Nov-04 5:44 
Hi Alok,

1. For the Runtime DLL, you need to stop the DLL from running under a debugger/IDE.

Have a look in the MSDN documentation for ::IsDebuggerPresent()

Also look at ::GetModuleFileName() - check the value that comes back and see if it corresponds to known debuggers/IDEs (eg "DEVENV", "MSDEV", "WinDBG") etc.

Of course, some sneaky people might rename MSDEV.EXE to something else. In this case you could go here[^] and grab the CVersionInfo class. Initialize it with the path returned from GetModuleFileName() and do the same check for known debuggers/IDEs using the value returned by CVersionInfo.GetInternalName(). Unless they go to the effort of changing the values in the Version Block, this will work.

You also want to see what the parent process is. Have a look at KB article 175030, which will show you how to do this. Again, once you have the name of the parent process you can do the debugger/IDE name check as above. This means that even if someone executes your DLL using Ctrl+F5 from Visual Studio (which "detaches" the executed program from the debugger) it will still trap them.

2. For the Developer DLL you don't need to do anything. I suppose if you *only* want it to run under a debugger/IDE, then you can just use step (1) and reverse all the logic Wink | ;)

Of course none of this is foolproof, but it will slow people down. I've used these methods and they work well.

Hope this helps,

Gary
GeneralRe: About Runtime and Developer Component Pin
ThatsAlok15-Nov-04 17:31
ThatsAlok15-Nov-04 17:31 
GeneralCOM Component Returning An Array to VBScript Pin
Doug Knudson3-Nov-04 4:32
Doug Knudson3-Nov-04 4:32 
GeneralRe: COM Component Returning An Array to VBScript Pin
Vi25-Nov-04 3:19
Vi25-Nov-04 3:19 
GeneralOK. Component Services (COM+) crashes (?) Pin
CherezZaboro2-Nov-04 5:40
CherezZaboro2-Nov-04 5:40 
GeneralAccessing ActiveX control of other process Pin
Behlool1-Nov-04 19:00
Behlool1-Nov-04 19:00 
GeneralCoCreateInstance Failure Pin
skrishnasarma31-Oct-04 22:44
skrishnasarma31-Oct-04 22:44 
GeneralRe: CoCreateInstance Failure Pin
User 2155972-Nov-04 18:19
User 2155972-Nov-04 18:19 
GeneralRe: CoCreateInstance Failure Pin
skrishnasarma2-Nov-04 21:21
skrishnasarma2-Nov-04 21:21 
GeneralRe: CoCreateInstance Failure Pin
User 2155974-Nov-04 17:03
User 2155974-Nov-04 17:03 
GeneralRe: CoCreateInstance Failure Pin
skrishnasarma4-Nov-04 21:38
skrishnasarma4-Nov-04 21:38 
GeneralCLSID for TAPI Pin
asif m@hmood30-Oct-04 7:08
asif m@hmood30-Oct-04 7:08 
GeneralRe: CLSID for TAPI Pin
ThatsAlok5-Nov-04 2:40
ThatsAlok5-Nov-04 2:40 
Generalcreate a simple hex editor Pin
CD_ROM30-Oct-04 3:58
CD_ROM30-Oct-04 3:58 
GeneralRe: create a simple hex editor Pin
ThatsAlok3-Nov-04 17:19
ThatsAlok3-Nov-04 17:19 
GeneralUniquness of GUID of COM Pin
Ranjish29-Oct-04 19:44
Ranjish29-Oct-04 19:44 
GeneralRe: Uniquness of GUID of COM Pin
ThatsAlok29-Oct-04 20:55
ThatsAlok29-Oct-04 20:55 
GeneralRe: Uniquness of GUID of COM Pin
Ranjish29-Oct-04 21:01
Ranjish29-Oct-04 21:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.