Sign in to follow this  
Followers 0
Greenhorn

DllStruct problem ...

2 posts in this topic

Hi,

I have problems to create a struct ...

Does in the following code 'Var4' containing $type ?

$type = 'uint;byte;str;long'

$struct = DllStructCreate('uint Var1; int Var2;char Var3;' & $type & ' Var4;dword Var5')

$data = DllStructGetData($struct, 'Var4')
; Is Var4 = uint;byte;str;long  ???

I hope you understand what I mean ... :D

I need to define a ($)type and set it in 'Var4' ...

Thank 'ya for support.

Greetz

Greenhorn

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Maybe, for better understanding ... :D

Here's the VB code:

Public Type GUID            ' This type I need below ...
   Data1 As Long
   Data2 As Integer
   Data3 As Integer
   Data4(7) As Byte
End Type

Public Type NOTIFYICONDATA
   cbSize As Long
   hWnd As Long
   uID As Long
   uFlags As Long
   uCallbackMessage As Long
   hIcon As Long
   szTip As String * 128
   dwState As Long
   dwStateMask As Long
   szInfo As String * 256
   uTimeoutAndVersion As Long
   szInfoTitle As String * 64
   dwInfoFlags As Long
   guidItem As GUID       ' ...here !
End Type

I need the GUID as guidItem in a DllStruct ...

Hmmm, or what happens, if I write ...

; is this the way  ?
$type = 'uint Var4;byte Var4;str Var4;long Var4;'

$struct = DllStructCreate('uint Var1; int Var2;char Var3;' & $type & 'dword Var5')

$data = DllStructGetData($struct, 'Var4')
; Is Var4 = uint;byte;str;long  ???

Is this correct, or what happens if I call DllStructGetData($struct, 'Var4') ... ?

Edited by Greenhorn

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0