Click here to Skip to main content
15,920,383 members
Home / Discussions / COM
   

COM

 
QuestionHow to realize my own shell format? Pin
Jerry New16-Feb-06 15:20
Jerry New16-Feb-06 15:20 
AnswerRe: How to realize my own shell format? Pin
QuickDeveloper16-Feb-06 21:43
QuickDeveloper16-Feb-06 21:43 
AnswerRe: How to realize my own shell format? Pin
mbue18-Feb-06 21:35
mbue18-Feb-06 21:35 
AnswerRe: How to realize my own shell format? Pin
Jerry New26-Feb-06 17:17
Jerry New26-Feb-06 17:17 
QuestionSIMPLE COM DLL WITH MULTI RETURN VALUES!!! Pin
LordBalu15-Feb-06 22:29
LordBalu15-Feb-06 22:29 
AnswerRe: SIMPLE COM DLL WITH MULTI RETURN VALUES!!! Pin
Stephen Hewitt15-Feb-06 23:55
Stephen Hewitt15-Feb-06 23:55 
AnswerRe: SIMPLE COM DLL WITH MULTI RETURN VALUES!!! Pin
LordBalu16-Feb-06 0:46
LordBalu16-Feb-06 0:46 
AnswerRe: SIMPLE COM DLL WITH MULTI RETURN VALUES!!! Pin
LordBalu16-Feb-06 2:58
LordBalu16-Feb-06 2:58 
Ok something has changed and a new error occured ok the following is working, it is compiling, that should be the right description:

<br />
interface Idatamng : IDispatch{<br />
	<br />
	typedef struct _MYPM<br />
	{<br />
		BSTR id1;<br />
		BSTR id2;<br />
	}MYPM;<br />
<br />
[id(6), helpstring("method test3")] HRESULT test3([out,retval] MYPM* peter);<br />
};<br />


This is the code from the idl file, and he compile it!
But now i try to access the struct from the cpp file of the class:

<br />
STDMETHODIMP Cdatamng::test3(MYPM* peter)<br />
{<br />
	<br />
	AFX_MANAGE_STATE(AfxGetStaticModuleState());<br />
<br />
	// TODO: Add your implementation code here<br />
<br />
	peter->id1 = CComBSTR("Test");<br />
	return S_OK;<br />
}<br />


if peter->id1 = CComBSTR("Test"); a constant string everything is fine, test it with a small vb app it gave me the string back to the client, but if i try to hold this parameter flexible by an variable of the class, for example orderid which is an array it fails:

<br />
STDMETHODIMP Cdatamng::test3(MYPM* peter)<br />
{<br />
	<br />
	AFX_MANAGE_STATE(AfxGetStaticModuleState());<br />
<br />
	// TODO: Add your implementation code here<br />
<br />
	peter->id1 = orderid[0];<br />
	return S_OK;<br />
}<br />


So the vb test app, returns a System.NullReference!
I dont know why he is not able to get the string back from the DLL.
I hope someone can help me on this topic!

Thanks for everything Smile | :)

greetz

Balu
GeneralRe: SIMPLE COM DLL WITH MULTI RETURN VALUES!!! Pin
Stephen Hewitt16-Feb-06 11:19
Stephen Hewitt16-Feb-06 11:19 
QuestionDirectX movie play from URL Pin
Anilkumar K V15-Feb-06 1:26
Anilkumar K V15-Feb-06 1:26 
QuestionDCOM services in Win2k Server Pin
LiYS14-Feb-06 23:58
LiYS14-Feb-06 23:58 
QuestionHooking into IE Pin
effeAF14-Feb-06 8:40
effeAF14-Feb-06 8:40 
AnswerRe: Hooking into IE Pin
Andy Moore14-Feb-06 11:15
Andy Moore14-Feb-06 11:15 
AnswerRe: Hooking into IE Pin
ThatsAlok14-Feb-06 23:08
ThatsAlok14-Feb-06 23:08 
GeneralRe: Hooking into IE Pin
effeAF15-Feb-06 8:07
effeAF15-Feb-06 8:07 
GeneralRe: Hooking into IE Pin
ThatsAlok15-Feb-06 17:48
ThatsAlok15-Feb-06 17:48 
QuestionURGENT HELP REQUIRED MMC IConsole2. Pin
URagavSouth14-Feb-06 2:14
URagavSouth14-Feb-06 2:14 
QuestionCOM Server Types... How They Work? Pin
Malli_S14-Feb-06 1:27
Malli_S14-Feb-06 1:27 
QuestionIntegrating Crystal Reports Pin
Niro198314-Feb-06 0:41
Niro198314-Feb-06 0:41 
QuestionHow In-Process component(DLL) share by no. of clients.... Pin
Siva Sankar Koyi13-Feb-06 23:55
Siva Sankar Koyi13-Feb-06 23:55 
AnswerRe: How In-Process component(DLL) share by no. of clients.... Pin
BiswaR14-Feb-06 2:54
BiswaR14-Feb-06 2:54 
GeneralRe: How In-Process component(DLL) share by no. of clients.... Pin
Siva Sankar Koyi14-Feb-06 17:03
Siva Sankar Koyi14-Feb-06 17:03 
GeneralRe: How In-Process component(DLL) share by no. of clients.... Pin
Milton Karimbekallil15-Feb-06 8:34
Milton Karimbekallil15-Feb-06 8:34 
QuestionHow to use an Active X Component in a WIN32 Project Pin
fearless stallion12-Feb-06 22:18
fearless stallion12-Feb-06 22:18 
AnswerRe: How to use an Active X Component in a WIN32 Project Pin
Milton Karimbekallil13-Feb-06 11:22
Milton Karimbekallil13-Feb-06 11:22 

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.