<div>hi<BR>thanks for the reply, <BR>i am still trying to run just the mpf_init from VB6<BR>i have compiled the following lines into the pbgmp.dll: the pb compiler v8.x does not issue errors:<BR>#COMPILE DLL "pbgmp"<BR>TYPE MPF<BR> mp_prec AS LONG<BR> mp_size AS LONG<BR> mp_expt AS LONG<BR> mp_limb AS LONG<BR>END TYPE</div> <div> DECLARE SUB cMPFinit CDECL LIB "libgmp-3.dll" ALIAS "__gmpf_init" (X AS MPF)<BR> DECLARE SUB cMPFclear CDECL LIB "libgmp-3.dll" ALIAS "__gmpf_clear" (X AS MPF)</div> <div><BR>SUB MPFinit ALIAS "mpf_init" (x AS MPF) EXPORT<BR> CALL cMPFinit(x)<BR>END SUB</div> <div>SUB MPFclear ALIAS "mpf_clear" (x AS MPF) EXPORT<BR> CALL cMPFclear(x)<BR>END SUB</div>
<div>and put the pbgmp.dll with libgmp-3.dll and VB6 code in the same folder:<BR>i run VB6 and write the following in a Module1.bas:<BR>Type MPF<BR> mp_prec As Long<BR> mp_size As Long<BR> mp_expt As Long<BR> mp_limb As Long<BR>End Type</div> <div>Declare Sub mpf_init Lib "pbgmp.dll" (x As MPF)<BR>Declare Sub mpf_clear Lib "pbgmp.dll" (x As MPF)</div> <div>and in the Form :<BR>Private Sub Command1_Click()<BR>Dim n As MPF<BR>mpf_init (n)<BR>End Sub<BR>but VB6 will issue the error message:<BR>variable required - can't assign to this expression, highlighing the (n) in mpf_init (n)<BR>whats wrong? i have looked at a code in the PurBasic forum:<BR><A
href="http://www.purebasic.fr/english/viewtopic.php?t=10776&start=0&postdays=0&postorder=asc&highlight=&sid=1dc7bfe4a44f32ac9dcfb11f57ab8a80">http://www.purebasic.fr/english/viewtopic.php?t=10776&start=0&postdays=0&postorder=asc&highlight=&sid=1dc7bfe4a44f32ac9dcfb11f57ab8a80</A></div> <div>there is a successfull code to call the GMP dll about in the half part of the long page, i have tried it successfully, the call to GMP dll is directly without a wrapper.<BR>some of the first parts of the code:</div> <div>Structure mpf ; multiprecision floating point <BR> mp_prec.l <BR> mp_size.l <BR> mp_expt.l <BR> mp_limb.l <BR>EndStructure </div> <div>x.mpf <BR>y.mpf <BR>z.mpf </div> <div>CallFunction(1,"__gmpf_init2",x,256); initialize float number x with 256 bits precision </div> <div>but i am still have a desire to Call GMP functions from VB6 , there are still millions of people who are using it
for its simple, rapid and friendly way <BR>please any suggestions,</div> <div>thanks very much<BR></div><p> 
        
                <hr size=1>Sneak preview the <a href="http://us.rd.yahoo.com/evt=40762/*http://www.yahoo.com/preview"> all-new Yahoo.com</a>. It's not radically different. Just radically better.