SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Strategies & Market Trends : TA-Quotes Plus -- Ignore unavailable to you. Want to Upgrade?


To: Jurgen who wrote (5964)8/13/1998 11:34:00 AM
From: Alain Joaris  Read Replies (1) | Respond to of 11149
 
Jurgen,

Sorry for not answering immediately, I have been busy trying to have it work.
The answer is YES, you can call the QP2 DLL functions from ACCESS. I wrote a VBA module based on the C main.cpp code provided with QP2. The VB code provided with QP2 for the functions definitions needed some modifications, but is basically OK.

There is still a problem to fix: VB doesn't allow optional arguments of a function to be of a user-defined type. This is a problem for the the following functions:
int __stdcall R2_QP_LoadSymbol(char *sym,void *data,int max_rec,bool RAWDATA = false, bool IGNORE_HOLIDAYS = true, usr_master_def *pMasterRec = 0);
int __stdcall R2_QP_Load_First_Symbol( ...
int __stdcall R2_QP_Load_Next_Symbol( ...

The equivalent VB code should be:

Public Declare Function LoadSymbol Lib "qpr2vb" (ByVal Symbol$,ByRef data As DataRec, ByVal MaxRecords As Long, Optional ByVal UseRAWMode As Long = True, Optional ByVal IgnoreHolidays As Long = False, Optional ByRef MasterRec As EquityMaster) As Long

But the compiler doesn't like this ... Without the argument referring to EquityMaster browsing works fine, but you don't get all the information out of the database.

I tried several possibilities but haven't found a satisfactory one yet.
Does somebody have experience with this ?

I'll keep you posted on this.



To: Jurgen who wrote (5964)8/15/1998 6:09:00 PM
From: Alain Joaris  Read Replies (2) | Respond to of 11149
 
Jurgen,

I am sending to your e-mail an ACCESS zipped file which contains the VBA code for 2 macros: Main and sample, they behave like main.cpp and sample.cpp provided with QP2.
I think this is a starting point for going further with VBA/QP2 DLL integration.
Dave's code for Registry querying is included as well.

Alain Joaris