Exception_acess_violation
Posted: 14 July 2010 01:42 PM   [ Ignore ]
New Member
Rank
Total Posts:  2
Joined  2010-07-11

I am trying to create a wrap of the sdk for blitzmax language. But I get a message of exception_access_violation.
I will write down the code. I am sure you will understand it cause blitzmax it’s very easy languege

Global CLEyeMulticam LoadLibraryA("CLEyeMulticam")

Global 
CLEyeGetCameraCount:Int()"win32" GetProcAddress(CLEyeMulticam "CLEyeGetCameraCount")

Global 
CLEyeGetCameraUUID:Byte Ptr(camid:Int)"win32" GetProcAddress(CLEyeMulticam "CLEyeGetCameraUUID")

Print 
CLEyeGetCameraCount()

CLEyeGetCameraUUID(1

Print CLEyeGeCameraCount() works.

but I get the error exception_access_violation with CLEyeGetCameraUUID(1)

My camera it’s activated.
Please help.

Profile
 
 
Posted: 15 July 2010 06:19 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  585
Joined  2009-09-17

haramanai,

Function CLEyeGetCameraUUID does not return a pointer. It returns a Guid (a structure). So I would look into this if blitzmax support this data type.

AlexP

Profile
 
 
Posted: 15 July 2010 08:38 AM   [ Ignore ]   [ # 2 ]
New Member
Rank
Total Posts:  2
Joined  2010-07-11

Oops my bad… sorry about that.
Blitzmax use types for structures. I will try to create one like the GUID stucture and try again.

By the way can you tell me where I can find the structures to try and convert them?

thanks

Profile
 
 
Posted: 16 July 2010 06:35 AM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  585
Joined  2009-09-17

A GUID is a 128-bit value consisting of one group of 8 hexadecimal digits, followed by three groups of 4 hexadecimal digits each, followed by one group of 12 hexadecimal digits.
Guid is defined as:

typedef struct _GUID 
{
    unsigned long  Data1
;
    
unsigned short Data2;
    
unsigned short Data3;
    
unsigned char  Data4[8];
} GUID

Here is an online guid generator.

Profile
 
 
 
 


RSS 2.0     Atom Feed