I don't have VB.NET installed (untick it out of habit) - but I looked at the VB code and it looks like the constructor's first argument is specified as By Val. Try de-referecing the handle and pass that - it may not work, but worth a try :-
OK, you want it to run under linux. Well, this site is mostly about windows, this forum is entirely about C++/CLI ( that is, C++ with .NET ). Unless you're asking a Mono question, you're in the wrong forum.
But, a program that's written in C++ works in 'DOS mode' by default, if you mean in a console instead of with windows.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
I have a situation where I need to return a fixed length string regardless of the length of a string that has been assigned to it. For example, if I wanted to have String1 which is made up of 12 spaces, then assing a returned value to a String2 which can be anything from 1 to 12 characters in length, how is this best done ?
The following may give you an idea where I'm coming from:
String^ Result; //This needs to be a fixed 12 characters.
hi, i want to make a network application that can be used in a standard Dos
not in the windows that mean it work in Dos Mode, the application is a sniffer so i can recieve and transmit the whole packet. so is there any library that can i use it to achieve my point, and thanks for all
This is absolutely the most insane thing I've ever had to do in programming, and I don't even know if it's possible. Please help.
I have an app built with the /clr switch. I have a DLL that contains custom controls, built with the /clr:pure switch because building custom controls with the /clr switch freaks out the IDE designer and I get the message "Failed to load. Custom control will be removed from toolbox."
Now, the custom control in the DLL needs to trigger certain methods of an unmanaged class in the main app. If this was all managed code, I could use delegates. If this was all unmanaged code, I could use function pointers. But how do I pass the address of an unmanaged function to a managed class?
Right now, my unmanaged function signature is like:
public void MyClass::MyFunc(short);
My DLL control managed typedef is:
typedef void MyDllFunc(short); //matches the signature of the unmanaged main app method
My DLL control field is declared:
In the main app I try to make the assignment:
myControl->myCall = &MyClass::MyFunc;
But I get the compiler error: "Cannot convert 'void(__thiscall MyClass::MyFunc::*)(short)' to 'void(__clrcall *)(short)'".
So what can I do to call an unmanaged function in the main app from a managed function in a DLL?
I dont know if this will help but I used boost events to do something similar. I have a managed template that attaches to the boost event in the unmanaged class and exposes a dot net event with the same arguments. When the boost event fires the dot net event is raised
System.IO.Path.IsPathRooted() does not behave as I would expect
I think that will do the trick. I don't know why I didn't think of it, because I already do some similar conversions just within my main app. All of a sudden I'm talking about crossing over between the main app and a DLL and I lost my head. Thanks for pointing out that article!
Last Visit: 31-Dec-99 19:00 Last Update: 4-Mar-24 14:32