Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Declare dll call caused an exception
Message
From
23/01/2005 17:46:36
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP2
Network:
Windows 2000 Pro
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00979001
Message ID:
00979864
Views:
45
>>
>>I believe David Frankenbach is correct in this case. You might want to try to pass by refference and filled in the variable to pass with chr(0) or space with the same length as it construct in VB. One more thing is that the filename must be zero terminated and put in the INI file: "FileNamesTerminated=1" without quotes. That's what the Doc's said
>>
> I'm confused. What do you think I should change in the following:
>THIS.nscan_opt=5
>THIS.cfront_fn = "F.TIF"
>THIS.cback_fn = "          "
>    temp_cfront_len = SPACE(255)
>    temp_cback_len  = SPACE(255)
>    temp_cmicr_text = SPACE(255)
>    temp_cmicr_len  = SPACE(255)
>
>    m.nretval=buicscan(THIS.nscan_opt,;
>      THIS.cfront_fn, ;
>      @temp_cfront_len, ;
>      THIS.cback_fn, ;
>      @temp_cback_len, ;
>      @temp_cmicr_text, ;
>      @temp_cmicr_len)
Just a guess. Since the declaration is prefixed with "lp", I think the type of this parameter used to be a Long Pointer but the VB code declared it as a String. It might help if you can post the C sample.

Try this first:
declare integer BUICScan in BUICAP32.DLL integer iJobType, ;
   string @lpFront, string @lpLenFront, ;
   string @lpBack, string @lpLenBack, ;
   string @lpCode, string @lpLenCode

    *** Don't forget to put this in the INI file
    *** FileNamesTerminated=1

    temp_cfront_fn  = "F.TIF" + chr(0)
    temp_cfront_len = SPACE(255)
    temp_cback_fn   = space( 4096 )
    temp_cback_len  = SPACE(255)
    temp_cmicr_text = SPACE(255)
    temp_cmicr_len  = SPACE(255)

    m.nretval=buicscan( 5, ;
      temp_cfront_fn, ;
      @temp_cfront_len, ;
      @temp_cback_fn, ;
      @temp_cback_len, ;
      @temp_cmicr_text, ;
      @temp_cmicr_len)
Herman
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform