Converting a VB typdef to Win32::API::Struct

O

Oistein Sorensen

Hi,

I'm new to perl-win32 programming and need your help.

I'm trying to convert this VB typedef to a Win32::API::Struct:

Public Type ReskInfo
lSize As Long ' Size of the entire structure
' Denne må settes til
Len(ReskInfo) før Api-kallet
sKey As Integer
sFiller1 As Integer ' for future use
lKundeNummer As Long
szKundeNavn As String * 30
bNull_1 As String * 1
szAdresseI As String * 30
bNull_2 As String * 1
szAdresseII As String * 30
bNull_3 As String * 1
szPostNummer As String * 6
bNull_4 As String * 1
szPostSted As String * 25
bNull_5 As String * 1
szTelefon As String * 15
bNull_6 As String * 1
szFax As String * 15
bNull_7 As String * 1
szEmailAdresse As String * 64
bNull_8 As String * 1
szBankgiroNr As String * 15
bNull_9 As String * 1
szPostgiroNr As String * 15
bNull_10 As String * 1
szDeresRef As String * 30
bNull_11 As String * 1
szOrganisasjonsNr As String * 15
bNull_12 As String * 1

sKundeGruppe As Integer ' Nytt felt Build 750
sRabattGruppe As Integer ' Nytt felt Build 750
sPrisKode As Integer ' Nytt felt Build 750
sBehandlingsProfil As Integer ' Nytt felt Build 750
sDistriktsNr As Integer ' Nytt felt Build 750
sMedarbeiderNr As Integer ' Nytt felt Build 750
sFiller2 As Integer ' for future use

dKredittGrense As Double
dSaldo As Double
End Type

When I run my program I get seg-fault in DLL file.

Can anyone help me with the datatypes?
VB Perl
--------- ---------
Long -> long
String * 30 -> ??
Integer -> int
Double -> double

Best,
/oistein/
 
B

Bart Lateur

Oistein said:
String * 30 -> ??

I don't know what this is in Win32::API::Struct, as the latter is pretty
new to me -- I just upgraded Win32::API and it's a new addition; but
that's likely a 30 byte pad.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top