[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Using External DLL from AFL



PureBytes Links

Trading Reference Links

Hello,

Detailed step-by-step instruction is (surprise!) in the manual:
http://www.amibroker.com/guide/a_aflcom.html

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "cstrader" <cstrader232@xxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Friday, April 20, 2007 7:04 PM
Subject: Re: [amibroker] Using External DLL from AFL


> OK, I'd really like to know if you have success with this because I've tried 
> for months and never succeeded in getting an activex control to run from AB. 
> I became convinced it was not possible.
> 
> I have vb studio 2005
> 
> I create the assembly  classlibrary1.dll
> it has a class:  class1
> which has a method:  test
> 
> Public Class Class1
> Public Function test() As Integer
> 
> Return 1
> 
> End Function
> 
> End Class
> 
> I check the "make assembly com visible" checkbox (should register it)
> 
> I get no error from the following AFL:  But nor does the function test 
> return any value other than "EMPTY".
> 
> myobj = CreateObject("ClassLibrary1.Class1");
> 
> test = myobj.test;
> 
> printf ("ZZ" + test);
> 
> What am I doing wrong?
> 
> How to debug?
> 
> Thanks
> 
> 
> ----- Original Message ----- 
> From: "Tomasz Janeczko" <groups@xxxxxxxxxxxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Friday, April 20, 2007 12:24 PM
> Subject: Re: [amibroker] Using External DLL from AFL
> 
> 
>> Hello,
>>
>> Visual BASIC does not create PLUGINS. So it does not need to be put
>> inside plugins directory.
>>
>> What you have created is ActiveX and to use it you need to
>> REGISTER it (There is an appropriate option in Visual Basic).
>>
>> If you move the activex to another computer you need to register it
>> using regsvr32.exe <nameofyourdll>
>>
>> Best regards,
>> Tomasz Janeczko
>> amibroker.com
>> ----- Original Message ----- 
>> From: "hanan.harush" <hanan.harush@xxxxxxxxx>
>> To: <amibroker@xxxxxxxxxxxxxxx>
>> Sent: Friday, April 20, 2007 2:20 PM
>> Subject: [amibroker] Using External DLL from AFL
>>
>>
>>> Hi All,
>>>
>>> 1. I have created a simple DLL  and tried to call a basic function
>>> from the DLL with zero success:
>>> 2. I put the MYDLL.dll file in AB Plugins directory ( as required ).
>>>
>>> Any idea why i CreateObject() fails ?
>>>
>>> Regards,
>>> Hanan Harush
>>>
>>> # here is my code
>>> Public Class MYDLL
>>>    Private _VERSION As Integer
>>>    Public Sub New()
>>> _VERSION  = 56
>>>    End Sub
>>>
>>>    Public Function getVersion() As integer
>>>        Return  _VERSION
>>>    End Function
>>>
>>> End Class
>>>
>>> # and my AFL code:
>>> myobj = CreateObject("MYDLL");
>>>
>>> if (myobj)
>>> {
>>> ver=myobj.getVersion();
>>>
>>> _TRACE("SUCCESS" + ver);
>>>
>>> }
>>>
>>> else
>>> {
>>>
>>> _TRACE("FAILED " );
>>> }
>>> Buy = 5;
>>> Sell =10;
>>> Plot(Close,"Price",colorBlack,styleBar);
>>>
>>>
>>>
>>>
>>> Please note that this group is for discussion between users only.
>>>
>>> To get support from AmiBroker please send an e-mail directly to
>>> SUPPORT {at} amibroker.com
>>>
>>> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
>>> http://www.amibroker.com/devlog/
>>>
>>> For other support material please check also:
>>> http://www.amibroker.com/support.html
>>>
>>> Yahoo! Groups Links
>>>
>>>
>>>
>>>
>>>
>>
>>
>> Please note that this group is for discussion between users only.
>>
>> To get support from AmiBroker please send an e-mail directly to
>> SUPPORT {at} amibroker.com
>>
>> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
>> http://www.amibroker.com/devlog/
>>
>> For other support material please check also:
>> http://www.amibroker.com/support.html
>>
>> Yahoo! Groups Links
>>
>>
>>
> 
> 
> 
> Please note that this group is for discussion between users only.
> 
> To get support from AmiBroker please send an e-mail directly to 
> SUPPORT {at} amibroker.com
> 
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
> 
> For other support material please check also:
> http://www.amibroker.com/support.html
> 
> Yahoo! Groups Links
> 
> 
> 
> 
>


Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/