Click here to Skip to main content
15,897,891 members
Home / Discussions / COM
   

COM

 
QuestionInstances of COM Objects Pin
HakunaMatada6-Jul-06 20:09
HakunaMatada6-Jul-06 20:09 
AnswerRe: Instances of COM Objects Pin
Lim Bio Liong6-Jul-06 22:30
Lim Bio Liong6-Jul-06 22:30 
GeneralRe: Instances of COM Objects Pin
george_thomas9-Jul-06 20:00
george_thomas9-Jul-06 20:00 
GeneralRe: Instances of COM Objects Pin
Lim Bio Liong9-Jul-06 21:01
Lim Bio Liong9-Jul-06 21:01 
QuestionCalling COM from C# managed code Pin
sony alex6-Jul-06 0:47
sony alex6-Jul-06 0:47 
QuestionPassing a string from C to VB Pin
Bratis5-Jul-06 22:04
Bratis5-Jul-06 22:04 
AnswerRe: Passing a string from C to VB Pin
peterchen8-Jul-06 5:31
peterchen8-Jul-06 5:31 
Questionerror importing api Pin
nikhil_ag19855-Jul-06 20:04
nikhil_ag19855-Jul-06 20:04 
Hi all,
Im new to ATL COM programming(2 weeks!). im using an api in my component.
unfortunately i havnt been able to load it appropriately(atleast this is what
the client says!). this is how i've done it... pls tell where im wrong.

i created an ATL class in the dll and added the following to the class' cpp
file in the global area
<br />
HINSTANCE hDll=LoadLibrary("API.dll");<br />
typedef short (*Init_type)();<br />
typedef short (*Close_type)();<br />
typedef short (*SetAnalog_type)(int,double);<br />
typedef short (*SetOutput_type)(int);<br />
typedef short (*ResetOutput_type)(int);<br />
typedef short (*IsInput_type)(int);<br />
<br />
Init_type Init;<br />
Close_type Close;<br />
SetAnalog_type SetAnalog;<br />
SetOutput_type SetOutput;<br />
ResetOutput_type ResetOutput;<br />
IsInput_type IsInput;<br />
<br />
Class::Class() //this is the constructor<br />
{<br />
    Init = (Init_type)GetProcAddress(hDll,"Init");<br />
    Close =(Close_type)GetProcAddress(hDll,"Close");<br />
    SetAnalog = (SetAnalog_type)GetProcAddress(hDll,"SetAnalog");<br />
    SetOutput = (SetOutput_type)GetProcAddress(hDll,"SetOutput");<br />
    ResetOutput = (ResetOutput_type)GetProcAddress(hDll,"ResetOutput");<br />
    IsInput = (IsInput_type)GetProcAddress(hDll,"IsInput");<br />
}<br />

after this i've created other methods in the class where i use these api
functions.
the dll compiles without problems, but when i use these methods in a vb
client i get this error...

The instruction at "0x00000000" referenced memeory at "0x00000000". The
memmory could not be "read".

Click on OK to terminate the program...

pls help... maybe i dont know how to load an api...im new to this. can
somebody give a link to a sample code where the coder has loaded the api and
used the functions.
Thanks in advance
Nikhil
QuestionBlinking Windowless activex ATL control Pin
emilmih5-Jul-06 11:39
emilmih5-Jul-06 11:39 
QuestionOutlook integration with external address book Pin
Mithin4-Jul-06 6:40
Mithin4-Jul-06 6:40 
QuestionAutomation error while creating a vc com dll object Pin
nikhil_ag19853-Jul-06 23:02
nikhil_ag19853-Jul-06 23:02 
AnswerRe: Automation error while creating a vc com dll object Pin
nikhil_ag19854-Jul-06 2:55
nikhil_ag19854-Jul-06 2:55 
GeneralRe: Automation error while creating a vc com dll object Pin
_AnsHUMAN_ 4-Jul-06 3:32
_AnsHUMAN_ 4-Jul-06 3:32 
GeneralRe: Automation error while creating a vc com dll object Pin
nikhil_ag19855-Jul-06 20:06
nikhil_ag19855-Jul-06 20:06 
QuestionDebug ActiveX control from C# application Pin
Maddie from Dartford3-Jul-06 21:11
Maddie from Dartford3-Jul-06 21:11 
QuestionHow DCOM is implemented? Pin
jayanthkulkarni3-Jul-06 2:21
jayanthkulkarni3-Jul-06 2:21 
AnswerRe: How DCOM is implemented? Pin
Mike Dimmick3-Jul-06 3:07
Mike Dimmick3-Jul-06 3:07 
QuestionHow to register a UPnP device Pin
Le Saint2-Jul-06 1:41
Le Saint2-Jul-06 1:41 
QuestionActiveX Question, help me. Pin
Shi Zhu29-Jun-06 23:18
Shi Zhu29-Jun-06 23:18 
AnswerRe: ActiveX Question, help me. Pin
peterchen8-Jul-06 5:33
peterchen8-Jul-06 5:33 
QuestionUsing MSHTML/CHtmlView in a thread Pin
Neville Franks29-Jun-06 16:31
Neville Franks29-Jun-06 16:31 
AnswerRe: Using MSHTML/CHtmlView in a thread Pin
Keith Worden30-Jun-06 1:04
Keith Worden30-Jun-06 1:04 
GeneralRe: Using MSHTML/CHtmlView in a thread Pin
Neville Franks30-Jun-06 1:38
Neville Franks30-Jun-06 1:38 
AnswerRe: Using MSHTML/CHtmlView in a thread Pin
peterchen8-Jul-06 5:37
peterchen8-Jul-06 5:37 
QuestionError registering dll Pin
Keith Worden29-Jun-06 7:33
Keith Worden29-Jun-06 7:33 

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.