Click here to Skip to main content
15,916,293 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
Generalconvert this C# declaration to MC++ Pin
devvvy23-Aug-03 17:35
devvvy23-Aug-03 17:35 
GeneralRe: convert this C# declaration to MC++ Pin
Tom Archer24-Aug-03 3:21
Tom Archer24-Aug-03 3:21 
GeneralRe: convert this C# declaration to MC++ Pin
devvvy24-Aug-03 6:27
devvvy24-Aug-03 6:27 
GeneralRe: convert this C# declaration to MC++ Pin
J. Dunlap24-Aug-03 10:07
J. Dunlap24-Aug-03 10:07 
GeneralRe: convert this C# declaration to MC++ Pin
devvvy25-Aug-03 0:05
devvvy25-Aug-03 0:05 
GeneralRe: convert this C# declaration to MC++ Pin
Tom Archer25-Aug-03 12:27
Tom Archer25-Aug-03 12:27 
GeneralRe: convert this C# declaration to MC++ Pin
devvvy25-Aug-03 0:07
devvvy25-Aug-03 0:07 
GeneralATL server and RCW Pin
devvvy23-Aug-03 7:18
devvvy23-Aug-03 7:18 
Playing with ATL server and RCW/Interop:

QUESTION 1. Can you pass custom defined object through COM interface? If you "Add Function" (right click classview on an ATL object/class), "Add Member Function Wizard" pops up. One can "choose" parameter type from the list of options available.

But what if I want to pass across interface the following:
a. A result set?
b. A user-defined class:

CMyClass
{

};

How can I do that? And can I do that in the first place?

QUESTION 2: What's the diff between "retval" and "out":

[propget, id(3), helpstring("property ComputerName")] HRESULT ComputerName([out, retval] BSTR* pVal);

"retval" IS "out" isn't it? If pVal is passed as a pointer, why do you need to marked the parameter as [out][retval]?

QUESTION 3: With ATL server projects, how can you add multiple interface? When you add "ATL simple object", the first interface is created for you by the wizard. Do you have do add to IDL file manually for subsequent interfaces? Is all that you need to do is to add to IDL? Any additional steps?



QUESTION 4: I tried to get a "double" across interface - but it always return "zero" to the client for some reason:

[id(1),helpstring("method GetRandNum")] HRESULT GetRandNum([out,retval] DOUBLE *RandNum);

STDMETHODIMP CCATLSimple::GetRandNum(DOUBLE* RandNum)
{
// TODO: Add your implementation code here
srand( (unsigned) time(NULL) );

double randy = rand();

RandNum = &randy;

return S_OK;
}

What could be the problem?

Thanks a lot, that's a long posting.
GeneralA very challenging problem Pin
gaurav_verma723-Aug-03 2:37
gaurav_verma723-Aug-03 2:37 
GeneralRe: A very challenging problem Pin
leppie23-Aug-03 8:50
leppie23-Aug-03 8:50 
GeneralRe: A very challenging problem Pin
Tom Archer25-Aug-03 15:05
Tom Archer25-Aug-03 15:05 
GeneralRe: A very challenging problem Pin
leppie26-Aug-03 7:08
leppie26-Aug-03 7:08 
GeneralRe: A very challenging problem Pin
Frank Olorin Rizzi28-Aug-03 18:34
Frank Olorin Rizzi28-Aug-03 18:34 
GeneralRe: A very challenging problem Pin
igor196023-Aug-03 17:00
igor196023-Aug-03 17:00 
GeneralRe: A very challenging problem Pin
Joey Bloggs26-Aug-03 20:32
Joey Bloggs26-Aug-03 20:32 
QuestionAlmost desperate, C# into C++, why not work? Pin
adaoja22-Aug-03 1:50
adaoja22-Aug-03 1:50 
AnswerRe: Almost desperate, C# into C++, why not work? Pin
Nemanja Trifunovic22-Aug-03 6:05
Nemanja Trifunovic22-Aug-03 6:05 
GeneralRe: Almost desperate, C# into C++, why not work? Pin
adaoja22-Aug-03 7:04
adaoja22-Aug-03 7:04 
GeneralRe: Almost desperate, C# into C++, why not work? Pin
Nemanja Trifunovic22-Aug-03 7:41
Nemanja Trifunovic22-Aug-03 7:41 
GeneralRe: Almost desperate, C# into C++, why not work? Pin
Nemanja Trifunovic22-Aug-03 7:48
Nemanja Trifunovic22-Aug-03 7:48 
GeneralRe: Almost desperate, C# into C++, why not work? Pin
adaoja22-Aug-03 11:02
adaoja22-Aug-03 11:02 
GeneralRe: Almost desperate, C# into C++, why not work? Pin
Nemanja Trifunovic22-Aug-03 11:47
Nemanja Trifunovic22-Aug-03 11:47 
GeneralRe: Almost desperate, C# into C++, why not work? Pin
adaoja25-Aug-03 1:17
adaoja25-Aug-03 1:17 
GeneralRe: Almost desperate, C# into C++, why not work? Pin
Anthony_Yio26-Aug-03 1:53
Anthony_Yio26-Aug-03 1:53 
GeneralRe: Almost desperate, C# into C++, why not work? Pin
adaoja26-Aug-03 2:30
adaoja26-Aug-03 2:30 

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.