Re: C# - Problem to receive data from a C++ Dll

Tech-Archive recommends: Speed Up your PC by fixing your registry



Hi,

You are probably right but I don't know which type of variable I can use.

I'm asking me something else also : the dll I'm using is a dll which was
created by embedded Visual C++ 3.0 and I want to use it on a Pocket PC 2003
device....
I know that eVC++3.0 is compatible with Pocket PC 2002 but I don't know if
it's compatible with Pocket PC 2003.

"Tegdeep" wrote:

> I'm not too sure about this, but are you sure you can convert a string
> array to a single char array?
>
> This is what I see from your code:
> "extern "C" void GetSN(TCHAR** pData)" <--takes a pointer to a TCHAR
> array
>
> string[] valueStr = new string[6]; <-- a string array
> ....
> GetSN(ref valueStr) <-- you're sending a string array by reference
> (pointer to a pointer to a pointer to a character....)
>
> The exception means that the invoked method is not supported.
> Basically, it is not recognising your function GetSN.
>
> Like I said, I'm not certain about this. But you can look into your
> code and verify this.
>
>
.



Relevant Pages

  • Re: CIL, CopyMemory and Compact Framework
    ... > to an Array buffer at the specified offset. ... > My Compact Framework version of SetDouble works fine on the Pocket PC 2002 ... You store a managed pointer into a variable of native pointer ...
    (microsoft.public.dotnet.framework.clr)
  • Re: Need a method to send byte arrays from Unmanaged C DLL to VB
    ... before calling the C routine. ... you can use a StringBuffer instead of a byte array. ... from a C DLL to VB? ... with ByRef Byteas a parameter, then treating it in C as a pointer to ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Array setup Question
    ... struct cm8linkstruc **cm8link; ... If I want to allocate 50 occurrences of this array then if the ... As soon as you say `dll', it's either irrelevant -- or off topic in this newsgroup. ... Since mallocreturns a pointer to void and such pointer is convertible to any pointer to object the cast is unnecessary -- and should be avoided (it can hide, for example, the failure to include. ...
    (comp.lang.c)
  • Re: Array Pointers in C#, calling C++ DLL
    ... > array in my calling function after use. ... > But I can fix the deallocation problem in the dll. ... public static extern int dll_dbl_read( ... The dll function sets this null pointer into a valid pointer by allocating ...
    (microsoft.public.dotnet.languages.csharp)
  • Pointer to LabVIEW Array
    ... When I write a C .dll that takes a LabVIEW array, ... LabVIEW passes a pointer into LabVIEW's memory to the array to C.  ...
    (comp.lang.labview)