Click here to Skip to main content
15,898,035 members
Home / Discussions / COM
   

COM

 
GeneralHandling COM Events Pin
i.chen24-Apr-05 20:34
sussi.chen24-Apr-05 20:34 
GeneralRe: Handling COM Events Pin
Frank_lgh9-May-05 14:45
Frank_lgh9-May-05 14:45 
GeneralC to MASM, troubles while converting. Pin
Brean24-Apr-05 11:34
Brean24-Apr-05 11:34 
GeneralActiveX controls on web pages Pin
Hugo Hallman24-Apr-05 11:01
Hugo Hallman24-Apr-05 11:01 
GeneralRe: ActiveX controls on web pages Pin
vishalmore11-May-05 21:17
vishalmore11-May-05 21:17 
GeneralRe: ActiveX controls on web pages Pin
Hugo Hallman12-May-05 1:27
Hugo Hallman12-May-05 1:27 
QuestionHow can we typecast the Exported Function pointers of a DLL Pin
sijis21-Apr-05 22:26
sijis21-Apr-05 22:26 
AnswerRe: How can we typecast the Exported Function pointers of a DLL Pin
Peter Ritchie23-Apr-05 7:36
Peter Ritchie23-Apr-05 7:36 
Could you be more specific?

You can't just arbitrarily typecast a function entry point to be anything you want. The function is going to expect certain things on the stack in order to execute properly.

By "dynamically" I assume you mean at run-time. Or, are you getting compile errors using GetProcAddress?

An example of properly casting the return of GetProcAddress:
void (*pFunc)(int) = (void (*)(int))::GetProcAddress(hModule, "MyProcName");

This example defines the variable pFunc as a pointer to a function that returns void and takes one int argument then initializes the variable to the return value of GetProcAddress() function. This assumes that MyProcName is defined as void MyProcName(int) in the source for the DLL.

These issues have been addressed with COM; I would suggest using COM rather than DLL entry points, expecially if you're not dealing with 3rd party binaries.



PeterRitchie.com
QuestionHow can I set DCOMCNFG Settings programmatically? Pin
Danillo21-Apr-05 4:49
Danillo21-Apr-05 4:49 
AnswerRe: How can I set DCOMCNFG Settings programmatically? Pin
Jason Henderson25-Apr-05 7:08
Jason Henderson25-Apr-05 7:08 
GeneralError : "The procedure number is out of range." Pin
Ed K19-Apr-05 10:56
Ed K19-Apr-05 10:56 
GeneralRe: Error : "The procedure number is out of range." Pin
Peter Ritchie23-Apr-05 7:38
Peter Ritchie23-Apr-05 7:38 
GeneralRe: Error : "The procedure number is out of range." Pin
Ed K23-Apr-05 7:47
Ed K23-Apr-05 7:47 
GeneralOut of proc Interface Implementation Problem Pin
thomas_tom9917-Apr-05 23:27
thomas_tom9917-Apr-05 23:27 
GeneralRe: Out of proc Interface Implementation Problem Pin
Anonymous18-Apr-05 4:18
Anonymous18-Apr-05 4:18 
GeneralRe: Out of proc Interface Implementation Problem Pin
Peter Ritchie23-Apr-05 7:43
Peter Ritchie23-Apr-05 7:43 
GeneralISyncMgrRegister and other Interfaces Pin
MichaelPine17-Apr-05 21:55
MichaelPine17-Apr-05 21:55 
GeneralRe: ISyncMgrRegister and other Interfaces Pin
Peter Ritchie23-Apr-05 7:44
Peter Ritchie23-Apr-05 7:44 
GeneralAxWebBrowser trouble Pin
cSharpBastard17-Apr-05 21:22
cSharpBastard17-Apr-05 21:22 
GeneralRe: AxWebBrowser trouble Pin
Peter Ritchie23-Apr-05 7:47
Peter Ritchie23-Apr-05 7:47 
QuestionOverloading methods in COM-Components. How to use the UNION data type? Pin
knaster bax14-Apr-05 22:09
knaster bax14-Apr-05 22:09 
AnswerRe: Overloading methods in COM-Components. How to use the UNION data type? Pin
rwestgraham26-Apr-05 14:29
rwestgraham26-Apr-05 14:29 
GeneralEstablish a virtual COM port for Bluetooth USB Dongle Pin
Tao Wang13-Apr-05 23:36
Tao Wang13-Apr-05 23:36 
GeneralRe: Establish a virtual COM port for Bluetooth USB Dongle Pin
Peter Ritchie23-Apr-05 8:03
Peter Ritchie23-Apr-05 8:03 
GeneralUsing a COM component Pin
MDowning13-Apr-05 13:35
MDowning13-Apr-05 13:35 

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.