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

Managed C++/CLI

 
GeneralRe: SP Pin
Mark Salsbery7-Mar-08 15:09
Mark Salsbery7-Mar-08 15:09 
GeneralRe: SP Pin
Paul Conrad7-Mar-08 15:12
professionalPaul Conrad7-Mar-08 15:12 
GeneralRe: SP Pin
led mike11-Mar-08 4:36
led mike11-Mar-08 4:36 
QuestionTree view Pin
rose1964-Mar-08 22:34
rose1964-Mar-08 22:34 
GeneralRe: Tree view Pin
Paul Conrad7-Mar-08 14:16
professionalPaul Conrad7-Mar-08 14:16 
GeneralMarshalling problem (from managed to unmanaged) Pin
s196675m3-Mar-08 7:13
s196675m3-Mar-08 7:13 
GeneralRe: Marshalling problem (from managed to unmanaged) Pin
led mike3-Mar-08 7:59
led mike3-Mar-08 7:59 
GeneralRe: Marshalling problem (from managed to unmanaged) Pin
s196675m3-Mar-08 11:06
s196675m3-Mar-08 11:06 
Sorry, for ambiguity.

led mike wrote:
s196675m wrote:
I am trying to access a function from an unmanaged DLL from my visual c++ managed GUI.


Declaration of the function I am trying to import from unmanaged (native) DLL is:

extern "C" __declspec(dllexport) TGrayImage<int>* init_seg(TGrayImage<float>* pImg, TMonoImage* monoImg, int nClass)


First you indicate an unmanged source, then:


Yes you are right. This line of declaration from unmanged source. (part of unmanaged DLL.


led mike wrote:
s196675m wrote:
Just for clarification, pimg and mono I am trying to pass is Managed varialble created within managed GUI.
TGrayImage<float>* pimg = new TGrayImage<float>* (width,height);// used new not gcnew
TmonoImage* mono = new TMonoImage(width, height);
These sample code is part of GUI( managed). I just showed here how I initialize pimg and mono variables before passing to the imported function
I have added the proper library (compiled with pure:MSIL) in my my GUI which supplied TGrayImage,TMonoImage.
Here I am trying to mean, The other library I used with GUI also complied as a managed library.


At this point I am at a complete loss to understand your scenario.






Now my main question is:

(1) Did I imported the function correctly ?
(2) Do I need to marshall the parameters before passing to the function?
(3) How Can I marshall the first two parameters?

Thank you.
GeneralRe: Marshalling problem (from managed to unmanaged) Pin
led mike4-Mar-08 8:07
led mike4-Mar-08 8:07 
GeneralRe: Marshalling problem (from managed to unmanaged) Pin
Mark Salsbery3-Mar-08 11:29
Mark Salsbery3-Mar-08 11:29 
GeneralRe: Marshalling problem (from managed to unmanaged) Pin
uusheikh4-Mar-08 21:27
uusheikh4-Mar-08 21:27 
GeneralRe: Marshalling problem (from managed to unmanaged) Pin
Mark Salsbery4-Mar-08 21:35
Mark Salsbery4-Mar-08 21:35 
GeneralRe: Marshalling problem (from managed to unmanaged) Pin
led mike5-Mar-08 4:32
led mike5-Mar-08 4:32 
GeneralRe: Marshalling problem (from managed to unmanaged) Pin
Mark Salsbery5-Mar-08 6:46
Mark Salsbery5-Mar-08 6:46 
Questiontool bar Pin
rose1962-Mar-08 20:56
rose1962-Mar-08 20:56 
GeneralRe: tool bar Pin
Giorgi Dalakishvili2-Mar-08 21:09
mentorGiorgi Dalakishvili2-Mar-08 21:09 
Questionhow to create a Project Location dialog box Pin
rose1962-Mar-08 18:48
rose1962-Mar-08 18:48 
GeneralRe: how to create a Project Location dialog box Pin
Mark Salsbery3-Mar-08 6:06
Mark Salsbery3-Mar-08 6:06 
QuestionCannot use null and how to declare return type of a function as array? [modified] Pin
Member 45422722-Mar-08 18:26
Member 45422722-Mar-08 18:26 
GeneralRe: Cannot use null and how to declare return type of a function as array? Pin
led mike3-Mar-08 4:58
led mike3-Mar-08 4:58 
GeneralRe: Cannot use null and how to declare return type of a function as array? Pin
Mark Salsbery3-Mar-08 6:04
Mark Salsbery3-Mar-08 6:04 
QuestionEXE vs LIB -- 30 times slower? Pin
s196675m29-Feb-08 15:14
s196675m29-Feb-08 15:14 
AnswerRe: EXE vs LIB -- 30 times slower? Pin
uusheikh4-Mar-08 21:18
uusheikh4-Mar-08 21:18 
GeneralRe: EXE vs LIB -- 30 times slower? Pin
s196675m5-Mar-08 8:00
s196675m5-Mar-08 8:00 
GeneralSerializable And Deserialize Pin
javad_200529-Feb-08 4:17
javad_200529-Feb-08 4:17 

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.