FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour converte from vb
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
converte from vb
Posted: Fri Jan 09, 2009 09:01 AM

someone can converte these funs from vb please ?

Private Declare Function OpenThemeData Lib "uxtheme.dll" (ByVal hWnd As Long, ByVal pszClassList As Long) As Long

Private Declare Function CloseThemeData Lib "uxtheme.dll" (ByVal hTheme As Long) As Long

Private Declare Function DrawThemeBackground Lib "uxtheme.dll" (ByVal hTheme As Long, ByVal lHDC As Long, ByVal iPartId As Long, ByVal iStateId As Long, pRect As RECT, pClipRect As RECT) As Long

Private Declare Function DrawText Lib "user32" Alias "DrawTextA" (ByVal hDC As Long, ByVal lpStr As String, ByVal nCount As Long, lpRect As RECT, ByVal wFormat As Long) As Long

thanks

Best Regards, Saludos



Falconi Silvio
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Re: converte from vb
Posted: Sat Jan 10, 2009 04:42 PM
kind regards

Stefan
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: converte from vb
Posted: Sun Jan 11, 2009 08:14 AM

Hello Stefan,

Thank you for this sample. I tried to compile this sample from César but get following error.

c:\fwhtests\806\tutor02.prg(27) Error E0021 Circularity detected in #translate: 'As'
c:\fwhtests\806\tutor02.prg(27) Error E0030 Syntax error: "syntax error at 'FUNCTION'"
c:\fwhtests\806\tutor02.prg(30) Warning W0007 Function 'MAIN' does not end with RETURN statement

Do you have a sample with a link file.
Thanks in advance
Otto

Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Re: converte from vb
Posted: Mon Jan 12, 2009 09:29 AM

Otto,

my tests this morning produced the same errors you get. There must be something wrong in the translate commands.

kind regards

Stefan
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Re: converte from vb
Posted: Tue Jan 13, 2009 12:39 PM
Otto,

you have to do the following changes to compile the saple without errors.

comment out these lines in vbdll.ch
#ifndef _VBDLL_CH_
#define _VBDLL_CH_

#xTranslate ByVal <x> => <x>
#xTranslate ByRef <x> => @<x>
//#xTranslate As Long => AS LONG
//#xTranslate As Integer => AS LONG
//#Translate As String => AS STRING
//#Translate As Boolean => AS BOOL
//#Translate As Any => AS LPSTR
//#Translate As Pointer => AS LPSTR
//#Translate As Void => AS VOID


change the vb function like this
// FWH entiende esta sintaxis / FWH understands this sintax

 Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" ;
  (ByVal pCaller As LONG, ByVal szURL As STRING, ByVal szFileName As STRING, ;
   ByVal dwReserved As LONG, ByVal lpfnCB As LONG) As LONG


See the parameter types are upper case !

It compiles now, but I don´t know if it´s working correct, we need a test with real data
kind regards

Stefan
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Re: converte from vb
Posted: Wed Jan 14, 2009 10:14 AM

I made a last test with real data for cUrl and cSaveAs.

It is working fine :D

kind regards

Stefan
Posts: 128
Joined: Wed Oct 26, 2005 12:18 PM
Re: converte from vb
Posted: Sat Jan 17, 2009 12:55 PM
Otto wrote:c:\fwhtests\806\tutor02.prg(27) Error E0021 Circularity detected in #translate: 'As'


Sorry!

This code compiles ok with xHarbour 0.99.7. Something has changed with the pre-processor that makes it fail with xH 1B.

Continue the discussion