|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Junior Member
Iscritto dal: Jan 2005
Messaggi: 17
|
[VB.NET 2005] .NET e DLL in C
Salve a tutti!
Vi spiego il mio problema: ho la necessità di utilizzare una dll scritta in c con una applicazione in VB.net in particolare ho dei problemi con questa funzione: Codice:
INT DLLEXPORT PhoneP2KGetFileList( struct p2k_fileInfo ** Files )
{
p2k_fileCount();
return p2k_FSAC_fileList( ( p2k_onFile )Files );
}
Codice:
struct p2k_fileInfo
{
long id;
char name[256];
long size;
unsigned char owner;
unsigned char attr;
};
Se vi può servire in VB.NET dichiaro così la funzione: Codice:
Public Declare Function PhoneP2KGetFileList Lib "MotoInterface.dll" (ByVal Files() As P2KFile) As Integer Codice:
Structure P2KFile
<MarshalAsAttribute(UnmanagedType.U4)> Dim Id As Int32
<MarshalAsAttribute(UnmanagedType.LPWStr)> Dim Name As String
<MarshalAsAttribute(UnmanagedType.U4)> Dim Size As Int32
<MarshalAsAttribute(UnmanagedType.U1)> Dim Owner As Byte
<MarshalAsAttribute(UnmanagedType.U1)> Dim Attr As Byte
End Structure
|
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 04:39.



















