VB6 setvariable

DLL Edition of the F-IN-BOX
RG
Posts: 4
Joined: Wed Jan 14, 2009 6:27 am
Location: Tyumen

VB6 setvariable

Postby RG » Wed Jan 14, 2009 6:34 am

Please help me, what's wrong?
...
Private Const FPCM_SETVARIABLEA As Long = (FPCM_FIRST + 285)

Private Type sfpc_txt
txt As String
len1 As Long
End Type

'SFPCSetVariable ansi
Private Type SFPCSetVariable
name As sfpc_txt
data As sfpc_txt
hr As Long

End Type
...
Dim FPCSetVariable As SFPCSetVariable
FPCSetVariable.name.txt = "cdchecked"
FPCSetVariable.name.len1 = Len(FPCSetVariable.name)

FPCSetVariable.data.txt = "1"
FPCSetVariable.data.len1 = Len(FPCSetVariable.data)

'sendmessage передает в анси кодировке

Call sendMessage(FlashPlayerControlWnd,FPCM_SETVARIABLEA,0&, FPCSetVariable)



But "cdchecked" variable in flash<>1
And ShockwaveFlash2.SetVariable "cdchecked", "1" worked fine.

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Wed Jan 14, 2009 1:10 pm

Thank you for your question.

It would be better to use the following:

Code: Select all

Private Declare Function FPC_SetVariable Lib "f_in_box.dll" _
    Alias "FPC_SetVariableA" _
    (ByVal hwndFlashPlayerControl As Long, _
    ByVal lpName As String, _
    ByVal lpValue As String) As Long

    ' SetVariable
    FPC_SetVariable FlashPlayerControlWnd, "var1", "value1"

    ' GetVariable
    Dim value As String
    value = String$(1024, 0)
    Dim temp As Long
    FPC_GetVariable FlashPlayerControlWnd, "var1", value, temp


Please check it.

Thank you.
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

RG
Posts: 4
Joined: Wed Jan 14, 2009 6:27 am
Location: Tyumen

Postby RG » Thu Jan 15, 2009 6:39 am

Work's fine.
Thank you


Return to “DLL Edition”

Who is online

Users browsing this forum: Bing [Bot] and 28 guests

cron