How to combine (or use) SDK dll into Fivewin HB/XHB?

AntoninoP
Posts: 347
Joined: Tue Feb 10, 2015 9:48 am
Location: Albenga, Italy
Contact:

Re: How to combine (or use) SDK dll into Fivewin HB/XHB?

Post by AntoninoP »

Hi,
I still have they from last test:

http://pastebin.com/PWUMLJzc
http://pastebin.com/XmNqUvX4
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: How to combine (or use) SDK dll into Fivewin HB/XHB?

Post by nageswaragunupudi »

AntoninoP wrote:Anyway I mus say that do hb_retptr and hb_retni/hb_retnl/hb_retnll is not the same
.............
so we can not substute hb_parn*/hb_retn* with hb_parptr/hb_retptr because they are 2 different things
I agree with you.

In the case of pointers we need to use hb_parptr() and hb_retptr() and in case of scalar values like long, HANDLEs we need to use hb_parnl(l).

In the above sample code, pKTPCBiz is a pointer and it is appropriate to use hb_retptr() and hb_parptr(). Even the value in Harbour has ValType 'P'.
Regards

G. N. Rao.
Hyderabad, India
User avatar
kim yong woo
Posts: 55
Joined: Sun Apr 12, 2009 10:51 am
Location: Seoul, Korea
Contact:

Re: How to combine (or use) SDK dll into Fivewin HB/XHB?

Post by kim yong woo »

Dear Antonino P,

Thanks so much for your prompt reply.
But, I faced following errors.
I guess " Too many error or warning messages' would mean my misunderstanding on certain point...

:oops:

Please help me...

Y.W.Kim


D:\prg>d:\bc5\bin\make -fopensdk.mak
MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
d:\harbour\bin\harbour .\opensdk.PRG /L /N /W /Oobj\ /Id:\fwh\include;d:
\harbour\include
Harbour 3.2.0dev (r1501292255)
Copyright (c) 1999-2015, http://harbour-project.org/
Compiling '.\opensdk.PRG'...
Lines 4491, Functions/Procedures 1
Generating C source output to 'obj\opensdk.c'... Done.
d:\bc5\bin\bcc32 -c -tWM -Id:\harbour\include -oobj\opensdk obj\opensdk.
c
Borland C++ 5.82 for Win32 Copyright (c) 1993, 2005 Borland
obj\opensdk.c:
Error E2303 d:\bc5\include\KTOpenAPI.h 571: Type name expected
Error E2303 d:\bc5\include\KTOpenAPI.h 600: Type name expected
Error E2303 d:\bc5\include\KTOpenAPI.h 1103: Type name expected
Error E2303 d:\bc5\include\KTOpenAPI.h 1132: Type name expected
Error E2303 d:\bc5\include\KTOpenAPI.h 2005: Type name expected
Error E2303 d:\bc5\include\KTOpenAPI.h 2034: Type name expected
Error E2303 d:\bc5\include\KTOpenAPI.h 2252: Type name expected
Error E2303 d:\bc5\include\KTOpenAPI.h 2281: Type name expected
Error E2303 d:\bc5\include\KTOpenAPI.h 2454: Type name expected
Error E2303 d:\bc5\include\KTOpenAPI.h 2483: Type name expected
Error E2303 d:\bc5\include\KTOpenAPI.h 2613: Type name expected
Error E2303 d:\bc5\include\KTOpenAPI.h 2642: Type name expected
Error E2303 d:\bc5\include\KTOpenAPI.h 2829: Type name expected
Error E2303 d:\bc5\include\KTOpenAPI.h 2858: Type name expected
Error E2303 d:\bc5\include\KTOpenAPI.h 3006: Type name expected
Error E2303 d:\bc5\include\KTOpenAPI.h 3035: Type name expected
Error E2303 d:\bc5\include\KTOpenAPI.h 3264: Type name expected
Error E2303 d:\bc5\include\KTOpenAPI.h 3293: Type name expected
Error E2303 d:\bc5\include\KTOpenAPI.h 3393: Type name expected
Error E2303 d:\bc5\include\KTOpenAPI.h 3422: Type name expected
Error E2303 d:\bc5\include\KTOpenAPI.h 3539: Type name expected
Error E2303 d:\bc5\include\KTOpenAPI.h 3568: Type name expected
Error E2303 d:\bc5\include\KTOpenAPI.h 3654: Type name expected
Error E2303 d:\bc5\include\KTOpenAPI.h 3683: Type name expected
Error E2303 d:\bc5\include\KTOpenAPI.h 3777: Type name expected
Error E2228 d:\bc5\include\KTOpenAPI.h 3777: Too many error or warning messages
*** 26 errors in Compile ***

** error 1 ** deleting .\obj\opensdk.OBJ
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: How to combine (or use) SDK dll into Fivewin HB/XHB?

Post by Antonio Linares »

Kim,

Please email me (or post here) KTOpenAPI.h

thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
AntoninoP
Posts: 347
Joined: Tue Feb 10, 2015 9:48 am
Location: Albenga, Italy
Contact:

Re: How to combine (or use) SDK dll into Fivewin HB/XHB?

Post by AntoninoP »

Antonio Linares wrote:Kim,

Please email me (or post here) KTOpenAPI.h

thanks
Here they are:
KTOpenAPI.h
KTOpenAPI_i.c

If someone know how use idl with borlan,
KTOpenAPI.idl

kim yong woo wrote:Borland C++ 5.82 for Win32 Copyright (c) 1993, 2005 Borland
^ this is the problem :)

anyway, I can not try with borland compiler,
but i compared BCC55\Include\activaut.h and KTOpenAPI.h and looks like borland needs

Code: Select all

#include <ole2.h>
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: How to combine (or use) SDK dll into Fivewin HB/XHB?

Post by Antonio Linares »

Antonino,

Many thanks for your help! :-)

Kim,

Could you please add #include <ole2.h> under #include "rpcndr.h" in KTOpenAPI.h ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
AntoninoP
Posts: 347
Joined: Tue Feb 10, 2015 9:48 am
Location: Albenga, Italy
Contact:

Re: How to combine (or use) SDK dll into Fivewin HB/XHB?

Post by AntoninoP »

Antonio Linares wrote:Kim,
Could you please add #include <ole2.h> under #include "rpcndr.h" in KTOpenAPI.h ?
or before #include "KTOpenAPI.h" in your code.

I am not convinced about it.
User avatar
kim yong woo
Posts: 55
Joined: Sun Apr 12, 2009 10:51 am
Location: Seoul, Korea
Contact:

Re: How to combine (or use) SDK dll into Fivewin HB/XHB?

Post by kim yong woo »

Thanks so much to Antonio Linares and AntoninoP..

I've inserted "#include <ole2.h>" in KTOpenAPi.h / Openapi.prg...
but.. didn't working..

I attached related files (including KTOpenApi.h, KTOpenApi_i.c.. and Dlls)
http://pharmalink.kr/images/error_file.zip
http://pharmalink.kr/images/dlle.zip

Appreciate deeply for your efforts and your valuable time...

Y.W.Kim
User avatar
Daniel Garcia-Gil
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita
Contact:

Re: How to combine (or use) SDK dll into Fivewin HB/XHB?

Post by Daniel Garcia-Gil »

Hello

try with this

Code: Select all

#include <fiveWin.ch>

proc main()
   LOCAL IKTPCBizX
   CoInitialize(0)
   IKTPCBizX := IKTPCBizX_New()

   IKTPCBizX

   if( IKTPCBizX<>0 )

      IKTPCBizX_LogIn(IKTPCBizX, ;
               /*nServer*/666, ;
               /*sAuthKey*/"Example", ;
               /*sLoginID*/"Antonino",  ;
               /*sLoginPwd*/"FiveWinForum")

      IKTPCBizX_Release(IKTPCBizX)
   endif

return

#pragma BEGINDUMP
#define CINTERFACE
#define COBJMACROS

#define _COM_Outptr_
#define _Out_opt_
#define _In_

#include "windows.h"
#include "hbapi.h"
#include "KTOpenAPI.h"
#include "KTOpenAPI_i.c"

HRESULT __stdcall MyCoCreateInstance(
  LPCTSTR szDllName,
  IN REFCLSID rclsid,
  IUnknown* pUnkOuter,
  IN REFIID riid,
  OUT LPVOID FAR* ppv)
{
  HRESULT hr = REGDB_E_KEYMISSING;

  typedef HRESULT (__stdcall *pDllGetClassObject)(IN REFCLSID rclsid,
                   IN REFIID riid, OUT LPVOID FAR* ppv);
  pDllGetClassObject GetClassObject;

  IClassFactory *pIFactory;

  HMODULE hDll = LoadLibrary(szDllName);
  if (hDll == 0)
    return hr;

  GetClassObject = (pDllGetClassObject)GetProcAddress(hDll, "DllGetClassObject");
  if (GetClassObject == 0)
  {
    FreeLibrary(hDll);
    return hr;
  }

  hr = GetClassObject(rclsid, &IID_IClassFactory, (LPVOID *)&pIFactory);

  if (!SUCCEEDED(hr))
    return hr;

  hr = IClassFactory_CreateInstance(pIFactory, pUnkOuter, riid, ppv);
  IClassFactory_Release(pIFactory);

  return hr;
}

HB_FUNC( IKTPCBIZX_NEW )
{
   IKTPCBizX* pKTPCBiz;
   //HRESULT hr;
   MyCoCreateInstance("KTOpenAPI.dll", &CLSID_KTPCBizX, 0, &IID_IKTPCBizX, (void**)&pKTPCBiz);
#ifndef _WIN64
   hb_retnl( (long)pKTPCBiz );
#else
   hb_retnll( (long long)pKTPCBiz );
#endif
}

LPWSTR UTF8toUTF16( LPCSTR utf8 );
/*
LPWSTR UTF8toUTF16( LPCSTR utf8 )
{
   int wLen = MultiByteToWideChar( CP_UTF8, 0, utf8, -1, 0, 0 );
   LPWSTR pString = ( LPWSTR ) hb_xgrab( wLen * 2 );

   MultiByteToWideChar( CP_UTF8, 0, utf8, -1, pString, wLen );

   return pString;
}
*/
HB_FUNC( IKTPCBIZX_LOGIN )
{
#ifndef _WIN64
   IKTPCBizX *pKTPCBiz = ( IKTPCBizX* ) hb_parnl( 1 );
#else
   IKTPCBizX *pKTPCBiz = ( IKTPCBizX* ) hb_parnll( 1 );
#endif
   BSTR sAuthKey = SysAllocString(UTF8toUTF16(hb_parc(3)));
   BSTR sLoginID = SysAllocString(UTF8toUTF16(hb_parc(4)));
   BSTR sLoginPwd = SysAllocString(UTF8toUTF16(hb_parc(5)));
   long nResult = 0;

   if( pKTPCBiz )
   {
      //IKTPCBizX_Login(pKTPCBiz, hb_parnl(2), sAuthKey, sLoginID, sLoginPwd, &nResult );
      pKTPCBiz->lpVtbl -> Login(pKTPCBiz,hb_parnl(2), sAuthKey, sLoginID, sLoginPwd, &nResult );
   }
   SysFreeString(sAuthKey);
   SysFreeString(sLoginID);
   SysFreeString(sLoginPwd);

   hb_retnl(nResult);
}

HB_FUNC( IKTPCBIZX_RELEASE )
{
#ifndef _WIN64
   IKTPCBizX *pKTPCBiz = ( IKTPCBizX* ) hb_parnl( 1 );
#else
   IKTPCBizX *pKTPCBiz = ( IKTPCBizX* ) hb_parnll( 1 );
#endif
   if( pKTPCBiz )
   {
      IKTPCBizX_Release(pKTPCBiz);
   }
   hb_ret();
}

#pragma ENDDUMP

 
fixed the make
not RC file founded
fixed obj filename

(change path)

Code: Select all

#Borland make sample, (c) FiveTech Software 2005-2009

HBDIR=c:\harbour
BCDIR=c:\bcc582
FWDIR=y:\git\fwh

#change these paths as needed
.path.OBJ = .\obj
.path.PRG = .\
.path.CH  = $(FWDIR)\include;$(HBDIR)\include
.path.C   = .\
.path.rc  = .\

#important: Use Uppercase for filenames extensions, in the next two rules!

PRG =        \
opensdk.PRG

PROJECT    : OpenSDK.exe

OpenSDK.exe  : $(PRG:.PRG=.OBJ) $(C:.C=.OBJ) #OpenSDK.res
   echo off
   echo $(BCDIR)\lib\c0w32.obj + > b32.bc
   echo obj\opensdk.obj, + >> b32.bc
   echo opensdk.exe, + >> b32.bc
   echo opensdk.map, + >> b32.bc
   echo $(FWDIR)\lib\FiveH.lib $(FWDIR)\lib\FiveHC.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbrtl.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbvm.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\gtgui.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hblang.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbmacro.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbrdd.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\rddntx.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\rddcdx.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\rddfpt.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbsix.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbdebug.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbcommon.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbpp.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbwin.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbcpage.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbct.lib + >> b32.bc
   rem by advice
   echo $(HBDIR)\lib\win\bcc\hbwin.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\gtgui.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbrtl.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbvm.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hblang.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbmacro.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbrdd.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\rddntx.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\rddcdx.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\rddfpt.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbsix.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbdebug.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbcommon.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbpp.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbcpage.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbcplr.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbct.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbpcre.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\xhb.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbziparc.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbmzip.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbzlib.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\minizip.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\png.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbusrrdd.lib + >> b32.bc

   rem Uncomment these two lines to use Advantage RDD
   rem echo $(HBDIR)\lib\win\bcc\rddads.lib + >> b32.bc
   rem echo $(HBDIR)\lib\win\bcc\Ace32.lib + >> b32.bc

   echo $(BCDIR)\lib\cw32.lib + >> b32.bc
   echo $(BCDIR)\lib\import32.lib + >> b32.bc
   rem add by advice
   echo $(BCDIR)\lib\cw32.lib + >> b32.bc
   echo $(BCDIR)\lib\uuid.lib + >> b32.bc
   echo $(BCDIR)\lib\import32.lib + >> b32.bc
   echo $(BCDIR)\lib\ws2_32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\odbc32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\nddeapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\iphlpapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\msimg32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\psapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\rasapi32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\gdiplus.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\shell32.lib, >> b32.bc

   IF EXIST Alert.res echo Alert.res >> b32.bc
   $(BCDIR)\bin\ilink32 -Gn -aa -Tpe -s @b32.bc
   del b32.bc

.PRG.OBJ:
  $(HBDIR)\bin\harbour $< /L /N /W /Oobj\ /I$(FWDIR)\include;$(HBDIR)\include
  $(BCDIR)\bin\bcc32 -c -tWM -I$(HBDIR)\include -oobj\$& obj\$&.c

.C.OBJ:
  echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp
  echo -I$(HBDIR)\include;$(FWDIR)\include >> tmp
  $(BCDIR)\bin\bcc32 -oobj\$& @tmp $&.c
  del tmp

#OpenSDK.res : OpenSDK.rc
#  $(BCDIR)\bin\brc32.exe -r OpenSDK.rc

 
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
User avatar
kim yong woo
Posts: 55
Joined: Sun Apr 12, 2009 10:51 am
Location: Seoul, Korea
Contact:

Re: How to combine (or use) SDK dll into Fivewin HB/XHB?

Post by kim yong woo »

Dear Mr.Antonio Linares,
Mr.AntoninoP.
and Mr.Daniel Garcia-Gil,

Thanks so much everybody...

compiled successfully...

I think the beginner like me can survive with help of good neighbors like you...

Thanks.
User avatar
kim yong woo
Posts: 55
Joined: Sun Apr 12, 2009 10:51 am
Location: Seoul, Korea
Contact:

Re: How to combine (or use) SDK dll into Fivewin HB/XHB?

Post by kim yong woo »

Again, I hope to have expert's support.

Thanks to previous help, there was no error message in compiling.
But, the "LOGIN" function did not work, and program finished without any message.

To test open1.prg, I've inserted "?" sentence as following.

Code: Select all

Procedure main()
   LOCAL IKTPCBizX
     Local nTest

   CoInitialize(0)
   IKTPCBizX := IKTPCBizX_New()
       ? 1
   if( IKTPCBizX<>0 )
     ? 2
      nTest:=IKTPCBizX_LogIn(IKTPCBizX, 0, "Example", "Antonino",  "FiveWinForum")
         ? 3
         ? 111, nTest

      IKTPCBizX_Release(IKTPCBizX)
   endif

return
 
Based on API manual, if the Login function work properly, the return value (nTest) should be
one of following value.

Code: Select all

declaration
    int Login( int nServer, string sAuthKey, string sLoginID, string sLoginPwd)
parameters
    nServer :  
             0 : test status
    sAuthKey : Authentification key, less than 40 bytes  
    sLoginID : ID in email format    pharmabase@natel.com
    sLoginPwd : password
return value
            success
            200 
            error 
            301 : site error
            401~408 : error situation 1~8
            500 : error type c
           1000, 1001, 
           1502~1507
            1700, 1701
 
The compiled program showed "1" at first,
and "2" as next..., then without showing "3", program finished.

When I inserted "?  IKTPCBizX", there was return value "3217288",
so, I guess "IKTPCBizX_New()" function may be works....

The followings are full source open1.prg ..compiled.

Code: Select all

#include <fiveWin.ch>

Procedure main()
   LOCAL IKTPCBizX
     Local cTest

   CoInitialize(0)
   IKTPCBizX := IKTPCBizX_New()
       ? 1, IKTPCBizX
   if( IKTPCBizX<>0 )
     ? 2
      cTest:=IKTPCBizX_LogIn(IKTPCBizX, 0, "Example", "Antonino",  "FiveWinForum")
         ? 3
         ? 111, cTest

      IKTPCBizX_Release(IKTPCBizX)
   endif

return

#pragma BEGINDUMP
#define CINTERFACE
#define COBJMACROS

#define _COM_Outptr_
#define _Out_opt_
#define _In_

#include "windows.h"
#include "hbapi.h"
#include "KTOpenAPI.h"
#include "KTOpenAPI_i.c"

HRESULT __stdcall MyCoCreateInstance(
  LPCTSTR szDllName,
  IN REFCLSID rclsid,
  IUnknown* pUnkOuter,
  IN REFIID riid,
  OUT LPVOID FAR* ppv)
{
  HRESULT hr = REGDB_E_KEYMISSING;

  typedef HRESULT (__stdcall *pDllGetClassObject)(IN REFCLSID rclsid,
                   IN REFIID riid, OUT LPVOID FAR* ppv);
  pDllGetClassObject GetClassObject;

  IClassFactory *pIFactory;

  HMODULE hDll = LoadLibrary(szDllName);
  if (hDll == 0)
    return hr;

  GetClassObject = (pDllGetClassObject)GetProcAddress(hDll, "DllGetClassObject");
  if (GetClassObject == 0)
  {
    FreeLibrary(hDll);
    return hr;
  }

  hr = GetClassObject(rclsid, &IID_IClassFactory, (LPVOID *)&pIFactory);

  if (!SUCCEEDED(hr))
    return hr;

  hr = IClassFactory_CreateInstance(pIFactory, pUnkOuter, riid, ppv);
  IClassFactory_Release(pIFactory);

  return hr;
}

HB_FUNC( IKTPCBIZX_NEW )
{
   IKTPCBizX* pKTPCBiz;
   //HRESULT hr;
   MyCoCreateInstance("KTOpenAPI.dll", &CLSID_KTPCBizX, 0, &IID_IKTPCBizX, (void**)&pKTPCBiz);
#ifndef _WIN64
   hb_retnl( (long)pKTPCBiz );
#else
   hb_retnll( (long long)pKTPCBiz );
#endif
}

LPWSTR UTF8toUTF16( LPCSTR utf8 );
/*
LPWSTR UTF8toUTF16( LPCSTR utf8 )
{
   int wLen = MultiByteToWideChar( CP_UTF8, 0, utf8, -1, 0, 0 );
   LPWSTR pString = ( LPWSTR ) hb_xgrab( wLen * 2 );

   MultiByteToWideChar( CP_UTF8, 0, utf8, -1, pString, wLen );

   return pString;
}
*/
HB_FUNC( IKTPCBIZX_LOGIN )
{
#ifndef _WIN64
   IKTPCBizX *pKTPCBiz = ( IKTPCBizX* ) hb_parnl( 1 );
#else
   IKTPCBizX *pKTPCBiz = ( IKTPCBizX* ) hb_parnll( 1 );
#endif
   BSTR sAuthKey = SysAllocString(UTF8toUTF16(hb_parc(3)));
   BSTR sLoginID = SysAllocString(UTF8toUTF16(hb_parc(4)));
   BSTR sLoginPwd = SysAllocString(UTF8toUTF16(hb_parc(5)));
   long nResult = 0;

   if( pKTPCBiz )
   {
      //IKTPCBizX_Login(pKTPCBiz, hb_parnl(2), sAuthKey, sLoginID, sLoginPwd, &nResult );
      pKTPCBiz->lpVtbl -> Login(pKTPCBiz,hb_parnl(2), sAuthKey, sLoginID, sLoginPwd, &nResult );
   }

   SysFreeString(sAuthKey);
   SysFreeString(sLoginID);
   SysFreeString(sLoginPwd);

   hb_retnl(nResult);
}


HB_FUNC( IKTPCBIZX_RELEASE )
{
#ifndef _WIN64
   IKTPCBizX *pKTPCBiz = ( IKTPCBizX* ) hb_parnl( 1 );
#else
   IKTPCBizX *pKTPCBiz = ( IKTPCBizX* ) hb_parnll( 1 );
#endif
   if( pKTPCBiz )
   {
      IKTPCBizX_Release(pKTPCBiz);
   }
   hb_ret();
}

#pragma ENDDUMP

 
And, full of open1.mak

Code: Select all

#Borland make sample, (c) FiveTech Software 2005-2009

HBDIR=d:\harbour
BCDIR=d:\bc5
FWDIR=d:\fwh

#change these paths as needed
.path.OBJ = .\obj
.path.PRG = .\
.path.CH  = $(FWDIR)\include;$(HBDIR)\include
.path.C   = .\
.path.rc  = .\

#important: Use Uppercase for filenames extensions, in the next two rules!

PRG =        \
open1.PRG

PROJECT    : Open1.exe

Open1.exe  : $(PRG:.PRG=.OBJ) $(C:.C=.OBJ) #Open1.res
   echo off
   echo $(BCDIR)\lib\c0w32.obj + > b32.bc
   echo obj\open1.obj, + >> b32.bc
   echo open1.exe, + >> b32.bc
   echo open1.map, + >> b32.bc
   echo $(FWDIR)\lib\FiveH.lib $(FWDIR)\lib\FiveHC.lib + >> b32.bc
   echo $(HBDIR)\lib\hbrtl.lib + >> b32.bc
   echo $(HBDIR)\lib\hbvm.lib + >> b32.bc
   echo $(HBDIR)\lib\gtgui.lib + >> b32.bc
   echo $(HBDIR)\lib\hblang.lib + >> b32.bc
   echo $(HBDIR)\lib\hbmacro.lib + >> b32.bc
   echo $(HBDIR)\lib\hbrdd.lib + >> b32.bc
   echo $(HBDIR)\lib\rddntx.lib + >> b32.bc
   echo $(HBDIR)\lib\rddcdx.lib + >> b32.bc
   echo $(HBDIR)\lib\rddfpt.lib + >> b32.bc
   echo $(HBDIR)\lib\hbsix.lib + >> b32.bc
   echo $(HBDIR)\lib\hbdebug.lib + >> b32.bc
   echo $(HBDIR)\lib\hbcommon.lib + >> b32.bc
   echo $(HBDIR)\lib\hbpp.lib + >> b32.bc
   echo $(HBDIR)\lib\hbwin.lib + >> b32.bc
   echo $(HBDIR)\lib\hbcpage.lib + >> b32.bc
   echo $(HBDIR)\lib\hbct.lib + >> b32.bc
   rem by advice
   echo $(HBDIR)\lib\hbwin.lib + >> b32.bc
   echo $(HBDIR)\lib\gtgui.lib + >> b32.bc
   echo $(HBDIR)\lib\hbrtl.lib + >> b32.bc
   echo $(HBDIR)\lib\hbvm.lib + >> b32.bc
   echo $(HBDIR)\lib\hblang.lib + >> b32.bc
   echo $(HBDIR)\lib\hbmacro.lib + >> b32.bc
   echo $(HBDIR)\lib\hbrdd.lib + >> b32.bc
   echo $(HBDIR)\lib\rddntx.lib + >> b32.bc
   echo $(HBDIR)\lib\rddcdx.lib + >> b32.bc
   echo $(HBDIR)\lib\rddfpt.lib + >> b32.bc
   echo $(HBDIR)\lib\hbsix.lib + >> b32.bc
   echo $(HBDIR)\lib\hbdebug.lib + >> b32.bc
   echo $(HBDIR)\lib\hbcommon.lib + >> b32.bc
   echo $(HBDIR)\lib\hbpp.lib + >> b32.bc
   echo $(HBDIR)\lib\hbcpage.lib + >> b32.bc
   echo $(HBDIR)\lib\hbcplr.lib + >> b32.bc
   echo $(HBDIR)\lib\hbct.lib + >> b32.bc
   echo $(HBDIR)\lib\hbpcre.lib + >> b32.bc
   echo $(HBDIR)\lib\xhb.lib + >> b32.bc
   echo $(HBDIR)\lib\hbziparc.lib + >> b32.bc
   echo $(HBDIR)\lib\hbmzip.lib + >> b32.bc
   echo $(HBDIR)\lib\hbzlib.lib + >> b32.bc
   echo $(HBDIR)\lib\minizip.lib + >> b32.bc
   echo $(HBDIR)\lib\png.lib + >> b32.bc
   echo $(HBDIR)\lib\hbusrrdd.lib + >> b32.bc

   rem Uncomment these two lines to use Advantage RDD
   rem echo $(HBDIR)\lib\win\bcc\rddads.lib + >> b32.bc
   rem echo $(HBDIR)\lib\win\bcc\Ace32.lib + >> b32.bc

   echo $(BCDIR)\lib\cw32.lib + >> b32.bc
   echo $(BCDIR)\lib\import32.lib + >> b32.bc
   rem add by advice
   echo $(BCDIR)\lib\cw32.lib + >> b32.bc
   echo $(BCDIR)\lib\uuid.lib + >> b32.bc
   echo $(BCDIR)\lib\import32.lib + >> b32.bc
   echo $(BCDIR)\lib\ws2_32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\odbc32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\nddeapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\iphlpapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\msimg32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\psapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\rasapi32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\gdiplus.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\shell32.lib, >> b32.bc

   IF EXIST Open1.res echo Open1.res >> b32.bc
   $(BCDIR)\bin\ilink32 -Gn -aa -Tpe -s @b32.bc
   del b32.bc

.PRG.OBJ:
  $(HBDIR)\bin\harbour $< /L /N /W /Oobj\ /I$(FWDIR)\include;$(HBDIR)\include
  $(BCDIR)\bin\bcc32 -c -tWM -I$(HBDIR)\include -oobj\$& obj\$&.c

.C.OBJ:
  echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp
  echo -I$(HBDIR)\include;$(FWDIR)\include >> tmp
  $(BCDIR)\bin\bcc32 -oobj\$& @tmp $&.c
  del tmp

#Open1.res : Open1.rc
#  $(BCDIR)\bin\brc32.exe -r Open1.rc

 

Please help me one more time...
If there is other thing I shall do, please teach me..

Thanks...in advance..

YongWoo, Kim
AntoninoP
Posts: 347
Joined: Tue Feb 10, 2015 9:48 am
Location: Albenga, Italy
Contact:

Re: How to combine (or use) SDK dll into Fivewin HB/XHB?

Post by AntoninoP »

I tried, it writes, in order,
  • 1 and 44899856
  • 2
  • My antivirus ask if I want allow the application acts as a internet server, I scared :mrgreen:
  • 3 and 1001 (i substutute "? 3" with "? 3, nTest", and removed the print of 111)
  • close
do you have a hb_out.log or other files that is a error log?

Ps. tried with harbour and visual studio compiler. and without the defines by Daniel
User avatar
kim yong woo
Posts: 55
Joined: Sun Apr 12, 2009 10:51 am
Location: Seoul, Korea
Contact:

Re: How to combine (or use) SDK dll into Fivewin HB/XHB?

Post by kim yong woo »

Dear Sirs,

I am trying to compile KTOpenApi prg with MSVC, but, when I see BuildM.bat (MSVC purpose),
I found following command.

set hdirl=%hdir%\lib\vc98
set vcdir=c:\vc98

And, in other websites, I am guessing that there might be "Harbour for MSVC" with different library, and Harbour for MSVC can
be optimised with VC 98.

But, at FWH package, there was only on Harbour 32bit file...

Can I think Harbour 32bit for Borland and MSVC were unified? or Shall I find it at another site?

Thanks...

Y.W.Kim
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: How to combine (or use) SDK dll into Fivewin HB/XHB?

Post by Antonio Linares »

Kim,

Please don´t use buildm.bat, instead use buildh32.bat

thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: How to combine (or use) SDK dll into Fivewin HB/XHB?

Post by Antonio Linares »

And use this Harbour for Visual Studio 2013:

https://bitbucket.org/fivetech/harbour- ... 150621.zip
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply