Declare Function SetOptionValueA Lib "engine.dll"(ByRef Name as
cstring, ByRef Value as cstring) as integer
return SetOptionValueA(mb1,mb2)
mb1 & mb2 are memory blocks, assigned in this manner:
mb1 = newMemoryBlock(1+LenB(sName))
mb2 = newMemoryBlock(1+LenB(sValue))
mb1.cstring(0) = sName
mb2.cString(0) = sValue
It's asking for a ByRef string, which is really a pointer to a string.
So you're missing one easy step:
dim strPtrName as new MemoryBlock( 4 )
strPtrName.Ptr( 0 ) = mb1
dim strPtrValue as new MemoryBlock( 4 )
strPtrValue.Ptr( 0 ) = mb2
SetOptionValue( strPtrName, strPtrValue )
Don't forget to turn the ByRef Name as CString into just Name as Ptr
(same for Value), and things should work.
HTH!
~Aaron
--
Of course, with the Pentium 3, 1 + 1 <> 2 except for very large values
of 2.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|