Hi!
I have a problem in calling a function from an external dll source.
Prototype for a function is given in vb code
Declare Function GetMessageData Lib "c:\windows\system\smartdll.dll" (ByVal
theLength As Integer, ByRef theMessageLength As Integer, ByVal
theMessageData As String) As Integer
I would like to call this funcition from c# and I just can't seem to get a
hang of it...
Manufacturer description is very scarce...
Where should I use the string, or do I need StringBuilder, can anyone help?
Thanks,
Marino 7 1563
On Jun 10, 8:52 am, "Marino" <mar...@dir.hrwrote:
Hi!
I have a problem in calling a function from an external dll source.
Prototype for a function is given in vb code
Declare Function GetMessageData Lib "c:\windows\system\smartdll.dll" (ByVal
theLength As Integer, ByRef theMessageLength As Integer, ByVal
theMessageData As String) As Integer
I suspect that your problem comes from "ByRef theMessageLength As
Integer",
you should call the finction with (theLength, ref theMessageLength,
theMessageData)
see REF before theMessageLength
>
I would like to call this funcition from c# and I just can't seem to get a
hang of it...
Manufacturer description is very scarce...
Where should I use the string, or do I need StringBuilder, can anyone help?
Thanks,
Marino
On Jun 10, 3:52*am, "Marino" <mar...@dir.hrwrote:
Hi!
I have a problem in calling a function from an external dll source.
Prototype for a function is given in vb code
Declare Function GetMessageData Lib "c:\windows\system\smartdll.dll" (ByVal
theLength As Integer, ByRef theMessageLength As Integer, ByVal
theMessageData As String) As Integer
I would like to call this funcition from c# and I just can't seem to get a
hang of it...
Manufacturer description is very scarce...
Where should I use the string, or do I need StringBuilder, can anyone help?
Thanks,
Marino
Does the function works in VB?
Is that VB.NET or VB6?
What kind of dll is it? Is it a win32 one or a COM dll?
Yes, that seems to be the problem. Thank you!
Even though that works in some functions, while other have problems.
I am currently thinking that the problem is within incompatibile types,
because I am programming in .net while this dll seems to function the best
in "old" languages...
Will keep trying...
"GArlington" <ga********@tiscali.co.ukwrote in message
news:af**********************************@s50g2000 hsb.googlegroups.com...
On Jun 10, 8:52 am, "Marino" <mar...@dir.hrwrote:
>Hi!
I have a problem in calling a function from an external dll source. Prototype for a function is given in vb code
Declare Function GetMessageData Lib "c:\windows\system\smartdll.dll" (ByVal theLength As Integer, ByRef theMessageLength As Integer, ByVal theMessageData As String) As Integer
I suspect that your problem comes from "ByRef theMessageLength As
Integer",
you should call the finction with (theLength, ref theMessageLength,
theMessageData)
see REF before theMessageLength
>> I would like to call this funcition from c# and I just can't seem to get a hang of it... Manufacturer description is very scarce... Where should I use the string, or do I need StringBuilder, can anyone help?
Thanks, Marino
Marino wrote:
Yes, that seems to be the problem. Thank you!
Even though that works in some functions, while other have problems.
I am currently thinking that the problem is within incompatibile
types, because I am programming in .net while this dll seems to
function the best in "old" languages...
Will keep trying...
VB6 Integer is .NET System.Int16, not the same as C# int (which is
System.Int32)
That may be your problem.
>
"GArlington" <ga********@tiscali.co.ukwrote in message
news:af**********************************@s50g2000 hsb.googlegroups.com...
>On Jun 10, 8:52 am, "Marino" <mar...@dir.hrwrote:
>>Hi!
I have a problem in calling a function from an external dll source. Prototype for a function is given in vb code
Declare Function GetMessageData Lib "c:\windows\system\smartdll.dll" (ByVal theLength As Integer, ByRef theMessageLength As Integer, ByVal theMessageData As String) As Integer
I suspect that your problem comes from "ByRef theMessageLength As Integer", you should call the finction with (theLength, ref theMessageLength, theMessageData) see REF before theMessageLength
>>> I would like to call this funcition from c# and I just can't seem to get a hang of it... Manufacturer description is very scarce... Where should I use the string, or do I need StringBuilder, can anyone help?
Thanks, Marino
This solved the problem... Strange dll, it references as though params are
long, but in some params it only accepts int16, in some int and in some
long... Very strange..
Thank you a bunch for your help!!
"Ben Voigt [C++ MVP]" <rb*@nospam.nospamwrote in message
news:Oc**************@TK2MSFTNGP06.phx.gbl...
Marino wrote:
>Yes, that seems to be the problem. Thank you! Even though that works in some functions, while other have problems. I am currently thinking that the problem is within incompatibile types, because I am programming in .net while this dll seems to function the best in "old" languages... Will keep trying...
VB6 Integer is .NET System.Int16, not the same as C# int (which is
System.Int32)
That may be your problem.
>> "GArlington" <ga********@tiscali.co.ukwrote in message news:af**********************************@s50g200 0hsb.googlegroups.com...
>>On Jun 10, 8:52 am, "Marino" <mar...@dir.hrwrote: Hi!
I have a problem in calling a function from an external dll source. Prototype for a function is given in vb code
Declare Function GetMessageData Lib "c:\windows\system\smartdll.dll" (ByVal theLength As Integer, ByRef theMessageLength As Integer, ByVal theMessageData As String) As Integer I suspect that your problem comes from "ByRef theMessageLength As Integer", you should call the finction with (theLength, ref theMessageLength, theMessageData) see REF before theMessageLength
I would like to call this funcition from c# and I just can't seem to get a hang of it... Manufacturer description is very scarce... Where should I use the string, or do I need StringBuilder, can anyone help?
Thanks, Marino
Marino wrote:
This solved the problem... Strange dll, it references as though
params are long, but in some params it only accepts int16, in some
int and in some long... Very strange..
I highly doubt that any of the parameters are a C# long (System.Int64).
LONG in C++ and Long in VB6 are the same as .NET System.Int32.
>
Thank you a bunch for your help!!
"Ben Voigt [C++ MVP]" <rb*@nospam.nospamwrote in message
news:Oc**************@TK2MSFTNGP06.phx.gbl...
>Marino wrote:
>>Yes, that seems to be the problem. Thank you! Even though that works in some functions, while other have problems. I am currently thinking that the problem is within incompatibile types, because I am programming in .net while this dll seems to function the best in "old" languages... Will keep trying...
VB6 Integer is .NET System.Int16, not the same as C# int (which is System.Int32)
That may be your problem.
>>> "GArlington" <ga********@tiscali.co.ukwrote in message news:af**********************************@s50g20 00hsb.googlegroups.com... On Jun 10, 8:52 am, "Marino" <mar...@dir.hrwrote: Hi! > I have a problem in calling a function from an external dll source. Prototype for a function is given in vb code > Declare Function GetMessageData Lib "c:\windows\system\smartdll.dll" (ByVal theLength As Integer, ByRef theMessageLength As Integer, ByVal theMessageData As String) As Integer I suspect that your problem comes from "ByRef theMessageLength As Integer", you should call the finction with (theLength, ref theMessageLength, theMessageData) see REF before theMessageLength > I would like to call this funcition from c# and I just can't seem to get a hang of it... Manufacturer description is very scarce... Where should I use the string, or do I need StringBuilder, can anyone help? > Thanks, Marino
Seems strange to me to, but if I use any other filetype other than long it
doesn''t work...
"Ben Voigt [C++ MVP]" <rb*@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
Marino wrote:
>This solved the problem... Strange dll, it references as though params are long, but in some params it only accepts int16, in some int and in some long... Very strange..
I highly doubt that any of the parameters are a C# long (System.Int64).
LONG in C++ and Long in VB6 are the same as .NET System.Int32.
>> Thank you a bunch for your help!!
"Ben Voigt [C++ MVP]" <rb*@nospam.nospamwrote in message news:Oc**************@TK2MSFTNGP06.phx.gbl...
>>Marino wrote: Yes, that seems to be the problem. Thank you! Even though that works in some functions, while other have problems. I am currently thinking that the problem is within incompatibile types, because I am programming in .net while this dll seems to function the best in "old" languages... Will keep trying...
VB6 Integer is .NET System.Int16, not the same as C# int (which is System.Int32)
That may be your problem.
"GArlington" <ga********@tiscali.co.ukwrote in message news:af**********************************@s50g2 000hsb.googlegroups.com... On Jun 10, 8:52 am, "Marino" <mar...@dir.hrwrote: >Hi! >> >I have a problem in calling a function from an external dll >source. Prototype for a function is given in vb code >> >Declare Function GetMessageData Lib >"c:\windows\system\smartdll.dll" (ByVal >theLength As Integer, ByRef theMessageLength As Integer, ByVal >theMessageData As String) As Integer I suspect that your problem comes from "ByRef theMessageLength As Integer", you should call the finction with (theLength, ref theMessageLength, theMessageData) see REF before theMessageLength >> >I would like to call this funcition from c# and I just can't seem >to get a >hang of it... >Manufacturer description is very scarce... >Where should I use the string, or do I need StringBuilder, can >anyone help? >> >Thanks, >Marino
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: bba |
last post by:
os:xp pro sp1
ie 6.2800.1106
For some reason any java scripts that refers
to 'external' fails:
example:
external.menuArguments.document.body.style.zoom="100%";
error message:
|
by: Ida |
last post by:
Hi,
I am trying to build an dll with Microsoft Visual C++ but during the linking
phase I get linking errors.
Script.obj : error LNK2019: unresolved external symbol
__imp__PyString_AsString...
|
by: Aravind |
last post by:
we have two files:
1. rc4.c (defines one function "create_pin()")
2. MyImpl.c(calling the function "create_pin()"),This implements JNI
method.
1.When I am trying to create .dll file with one...
|
by: al.cpwn |
last post by:
do static and inline functions or members have internal linkage? I have
been reading this newsgroup on google and found conflicting ideas. Can
someone please help me understand why in some places...
|
by: f rom |
last post by:
----- Forwarded Message ----
From: Josiah Carlson <jcarlson@uci.edu>
To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org
Sent: Monday, December 4, 2006 10:03:28 PM
Subject: Re: ...
|
by: Maydogg6 |
last post by:
I need a hand with some stubborn link errors.
I'm trying to recreate and old program from 6.0 into .NET, but for some reason when I try to compile I'm getting linking errors for all my function...
|
by: sadegh |
last post by:
Hi
I have a problem with my program in VC++6
When I compile it, the following errors are listed. I spend a lot of
time on the groups.google.com to find its reason, but none of comments
could...
|
by: debasisdas |
last post by:
This thread contains some useful tips for using External tables.
USING EXTERNAL TABLE
=======================
1.THE TABLE POINTS TO EXTERNAL FILE. IF DATA IS ALTERED IN THE EXTERNAL FILE,DATA...
|
by: Ryan Gaffuri |
last post by:
hlink72@hotmail.com (Eric) wrote in message news:<ab8d8b14.0308220550.54fb5f22@posting.google.com>...
LNK1120 is a standard C++ error. you using Visual C++? Means your
references a class that...
|
by: =?Utf-8?B?YmFzaA==?= |
last post by:
Hello,
I am compiling a CPP code using Visual studion .net 2003. I get the
following error, despite having windldap.h and wldap32.dll in my include and
lib paths. Here is the error.
uuid.lib...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |