I tried this, but it doesn't work. I think that DLL_A works fine, since I can use it from VB. To export the routine both DLL´s have a .def file. The dllexport apears to be a substitute for the .def file, but is not necasary if you have a .def file. Anyway it seems that DLL_B can not find DLL_A...
Thanks xwb,
This shurely is an important syntax error. Now I don´t get the AccessViolationError anymore.
The problem is that the LoadLirary call fails (resulting in my error code 101). The DLL path is correct and from VB.net I can call DLL_A perfectly using the declare keyword.
Any more hints?
I created a simple DLL with the following code:
#include "stdafx.h"
#include "winNT.h"
#include <stdio.h>
#include <windows.h>
UINT A_AddOne (UINT32 Base)
{
return Base + 1;
}
I created a .def file an from VB.net I can call this DLL without problems. Now I created a second DLL that calls...
Hi,
After some days I found the solution. All I need is a simple .def file to export the functions of the DLL. Like I said, I´m a vb programmer and new in c. Thanks anyway
Hi,
Actually I´m a VB-programmer, but I´ve a problem that I can´t resolve with VB so I come to this C forum. I need to create a DLL witch functions I can call as flat unmanaged code. For example I want to call a method named "MyFun" in the DLL "MyDLL.DLL" that accepts an UINT32 as a value...
If yo know that all string will start with non-muneric and end with numeric you coud use
Dim result as string
Dim myStr as string = "Check121"
Dim x as integer = 0
Do while x<len(myStr)
x+=1
if IsNumeric(myStr.Substring(x,1)) then exit do
loop
result = myStr.Substring(1,x-1)
I'm affraid that it isn´t possible with VB and I'll have to write my wrapper in C and compile it to unmanaged code. Studying on that one now, but that'll be for another forum...
Thanks for your answer, but I think I wasn´t clear enough. I have a driver in a DLL that comes with an USB Device. This driver acceps calle in the form of:
Public Declare Function aFunction Lib "MyDriver.dll" _
(ByVal aLong As Int32, ByRef aInt As Int16) _
As Int32
I want to create a...
Hi All,
I have a driver for external hardware that is in unmanaged code and I want to wrote a wrapper for this driver. Programs that use this driver will call the wrapper instead of the original driver. The wrapper will pass these calls to the original driver. Call to the driver are made by...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.