www.f-in-box.com Forum Index www.f-in-box.com
F-IN-BOX
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
F-IN-BOX Home | DLL Edition | Delphi Edition | .NET Edition

VB6 setvariable

 
Post new topic   Reply to topic    www.f-in-box.com Forum Index -> DLL Edition
View previous topic :: View next topic  
Author Message
RG



Joined: 14 Jan 2009
Posts: 4
Location: Tyumen

PostPosted: Wed Jan 14, 2009 6:34 am    Post subject: VB6 setvariable Reply with quote

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.
Back to top
View user's profile Send private message
Softanics
Site Admin


Joined: 18 Sep 2004
Posts: 1262
Location: Russia, St. Petersburg

PostPosted: Wed Jan 14, 2009 1:10 pm    Post subject: Reply with quote

Thank you for your question.

It would be better to use the following:

Code:

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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
RG



Joined: 14 Jan 2009
Posts: 4
Location: Tyumen

PostPosted: Thu Jan 15, 2009 6:39 am    Post subject: Reply with quote

Work's fine.
Thank you
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    www.f-in-box.com Forum Index -> DLL Edition All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group