Hi, I've got a rather old DLL (built with VS2003) that compiles properly with the 'Multi byte charset' option under VS2005. Now, I cannot call any functions of this dll out of a VB .net application (would need 'Use Unicode' option for that..). As I do not want to rewrite the whole application for unicode usage: Is there any way to call functions out of this DLL in a .net 2.0 application? Thanks, Peter
mosquitooth
Posts
-
Calling unmanaged function -
Exporting functions with stringsHi, I've got a (probably) common problem: I want to create a several unmanged C++ DLLs in VS2005, most of them shall export functions with strings (best CString), like this: void TestFunc1(int a, CString b); void TestFunc2(int a, LPCTSTR b); CString TestFunc3(int a); All these DLLs compile and link well, but when I try to use them in my applications, I always receive a linker error (LNK2019: undefined external symbol). Obviously, this problem is related to the use of strings as arguments (or return values), because if I remove them as arguments, everything works fine... any ideas how to solve this? Greetings, Peter
-
.net application and C dllHi, my current project consists of a .net application (exe in VB.NET) and a VC++ DLL. Normally, I just call functions in the DLL out of my application, which works just fine. But sometimes I'd like to do it the other way round: to call functions in the .net application out of my C++- Code. Is this possible, and if so, how is it done? Thanks a lot mosquitooth
-
Set Selected ItemHi how can I set the item that is selected in a listview? Thanks mosquitooth
-
Export to XLSHi I run the following SQL- statement in my VB.NET application to export the results of a query to Excel: g.CommandText = "SELECT * INTO [Excel 8.0;DATABASE=C:\test.xls;HDR=NO;].Table1 FROM [MyTable] WHERE... 'g is a valid OleDbCommand object This statement fails, if the xls- file already exists. I've heard that the INSERT INTO statement could deal with this - could anyone provide me some SQL- string that does the trick?? Thanks a lot! Can anyone help me? Gordon
-
NotifyIcon in .net serviceHI I want to develop an interactive .net service that creates a notifyicon at startup, so that the user can interact with it (e.g. a double click on the icon in the systray shall cause the service to react). So I placed such a control in the service class and made it handle double click events ..... but just nothing happens! When I doubleclick the icon in the systray the appropriate code in the service is not called and executed!! can anyone help me?? mosquitooth