Linked with external 64-bit Unicode C/C++ Visual Studio DLL

External libraries (GTK, GSL, SDL, Allegro, OpenGL, etc) questions.
Patrice Terrier
Posts: 19
Joined: Jan 06, 2006 8:27
Location: France
Contact:

Linked with external 64-bit Unicode C/C++ Visual Studio DLL

Post by Patrice Terrier »

I would like to link an external 64-bit UNICODE DLL written in C/C++.

Should I use implicit or explicit linking.

The name of my DLL is "WinLIFT64.dll" (I also have the WinLIFT64.lib created with Visual Studio)
I am using the fastcall convention and undecorated names, because this is the default 64-bit setup in VS 2022.
All strings are UNICODE.

Here is the code I would like to convert

#pragma comment(lib, "WinLIFT64.lib")
#define C_IMPORT extern "C" __declspec(dllimport)
C_IMPORT long skInitEngine (IN WCHAR* zSkinFile, IN WCHAR* zUserKey);
C_IMPORT void skSkinWindow (IN HWND hWnd, IN WCHAR* zSysButTip);
C_IMPORT LONG_PTR skFontPlus ();

LONG_PTR is defined as long long (8 bytes in 64-bit)

Here is my attempt to convert the header to FreeBASIC

#Define UNICODE
#include once "windows.bi"
#inclib "WinLIFT64"
#Define LONG_PTR LongInt
Declare Function skInitEngine(ByVal zSkinFile As WString Ptr, ByVal zUserKey As WString Ptr) As Long
Declare Function skSkinWindow(ByVal hWnd As HWND, ByVal zSysButTip As WString Ptr) As Long

I am using fbc64 version 1.10.1 (2023-12-24)

Unfortunatly that doesn't work.

Could you help?

Thank you.
srvaldez
Posts: 3648
Joined: Sep 25, 2005 21:54

Re: Linked with external 64-bit Unicode C/C++ Visual Studio DLL

Post by srvaldez »

hello Patrice Terrier :)
have tried WCHAR ptr instead of WString Ptr ?

BTW, I downloaded Winlift 7.0 and after deleting the prefix C_IMPORT and the IN and OUT from the from the parameter list fbfrog translates the header with no problem, though some cleaning up is needed
Patrice Terrier
Posts: 19
Joined: Jan 06, 2006 8:27
Location: France
Contact:

Re: Linked with external 64-bit Unicode C/C++ Visual Studio DLL

Post by Patrice Terrier »

No, I didn't tried WCHAR ptr instead of Wstr pt.
Indeed I have trusted ChatGPT, because I do not know the complete FreeBasic keyword list.

Could you please give me your header translation.

Thanks.

PS: I do not know FBfrog.
Last edited by Patrice Terrier on Jun 11, 2025 17:54, edited 1 time in total.
srvaldez
Posts: 3648
Joined: Sep 25, 2005 21:54

Re: Linked with external 64-bit Unicode C/C++ Visual Studio DLL

Post by srvaldez »

Patrice Terrier
here's what fbfrog produced

Code: Select all

#pragma once

#include once "crt/long.bi"
#include once "windows.bi"

extern "C"

const ANCHOR_NONE as const long = -1
const ANCHOR_LEFT as const long = 0
const ANCHOR_WIDTH as const long = 1
const ANCHOR_RIGHT as const long = 2
const ANCHOR_CENTER_HORZ as const long = 3
const ANCHOR_HEIGHT as const long = 4
const ANCHOR_HEIGHT_WIDTH as const long = 5
const ANCHOR_HEIGHT_RIGHT as const long = 6
const ANCHOR_BOTTOM as const long = 7
const ANCHOR_BOTTOM_WIDTH as const long = 8
const ANCHOR_BOTTOM_RIGHT as const long = 9
const ANCHOR_CENTER_HORZ_BOTTOM as const long = 10
const ANCHOR_CENTER_VERT as const long = 11
const ANCHOR_CENTER_VERT_RIGHT as const long = 12
const ANCHOR_CENTER as const long = 13
const ANCHOR_LAST as const long = ANCHOR_CENTER
const SK_METRICFIRST as const long = 0
const SK_CYCAPTION as const long = SK_METRICFIRST
const SK_CYMENU as const long = 1
const SK_CYSTATUS as const long = 2
const SK_CXFRAMELEFT as const long = 3
const SK_CXFRAMERIGHT as const long = 4
const SK_CYFRAMETOP as const long = SK_CYCAPTION
const SK_CYFRAMEBOTTOM as const long = 5
const SK_CXSIZE as const long = 6
const SK_CYSIZE as const long = 7
const SK_CXSYSBUT as const long = 8
const SK_CYSYSBUT as const long = 9
const SK_CXCAPTEXT as const long = 10
const SK_CYCAPTEXT as const long = 11
const SK_XBUT3DBORDER as const long = 12
const SK_YBUT3DBORDER as const long = 13
const SK_CXSYSICON as const long = 14
const SK_CYSYSICON as const long = 15
const SK_CXSYSLED as const long = 16
const SK_CYSYSLED as const long = 17
const SK_TRANSLUCENCY as const long = 18
const SK_MENUTRANSLUCENCY as const long = 19
const SK_PAINT_BORDER as const long = 20
const SK_PAINT_BACKGROUND as const long = 21
const SK_ICONSIZE as const long = 22
const SK_OUTER_GLOW as const long = 23
const SK_SKIN_ICON as const long = 24
const SK_DWM_AERO as const long = 25
const SK_DWM_LEFT as const long = 26
const SK_DWM_TOP as const long = 27
const SK_DWM_RIGHT as const long = 28
const SK_DWM_BOTTOM as const long = 29
const SKMETRIC_UB as const long = 30

declare function skPopupOwner(byval hWnd as HWND) as HWND
declare function skCaptionFont() as HFONT
declare function skFont() as HFONT
declare function skFontBold() as HFONT
declare function skFontDlg() as HFONT
declare function skCaptionFontPlus() as LONG_PTR
declare function skFontPlus() as LONG_PTR
declare function skFontBoldPlus() as LONG_PTR
declare function skFontDlgPlus() as LONG_PTR
declare sub skSkinDisable(byval hWnd as HWND)
declare sub skSetZorder(byval hWnd as HWND, byval UseOrder as HWND)
declare function skGetHdcMemBmp(byval hOwner as HWND) as HDC
declare function skARGB(byval A as BYTE, byval R as BYTE, byval G as BYTE, byval B as BYTE) as DWORD
declare sub ComputeAspect(byval xPic as clong, byval yPic as clong, byval xCell as clong, byval yCell as clong, byref xP as clong, byref yP as clong, byref xS as clong, byref yS as clong)
declare sub skChildOffset(byval hWnd as HWND, byref ofX as clong, byref ofY as clong)
declare sub skSetLabelFont(byval hCtrl as HWND, byval zFontName as WCHAR ptr, byval nFontSize as WORD, byval ARGBcolor as clong, byval nFontStyle as WORD, byval redraw as BOOL)
declare function skVersion() as WCHAR ptr
declare function skSetAnchorCtrl(byval hWnd as HWND, byval AnchorMode as clong) as clong
declare function skUsingDWM() as clong
declare function skSkinFolder() as WCHAR ptr
declare function skButImage(byval hOwner as HWND, byval hBitmap as HBITMAP, byval xLeft as clong, byval yLeft as clong, byval ButID as clong) as HWND
declare function skAuthor() as WCHAR ptr
declare function skBorder(byval hWnd as HWND, byval x as clong, byval y as clong, byval xW as clong, byval yH as clong, byval nID as clong, byval nBorder as clong) as HWND
declare sub skSkinChildCtrl(byval hWnd as HWND, byval RedrawFlag as clong)
declare sub skSkinEnable(byval hWnd as HWND)
declare sub skRedrawMenuBar(byval hWnd as HWND)
declare function skGetMenu(byval hWnd as HWND) as HMENU
declare function skMenuContainer(byval hWnd as HWND) as HWND
declare sub skSkinWindowUpdate(byval hWnd as HWND, byval RedrawFlag as clong)
declare function skSkinWindow(byval hWnd as HWND, byval zSysButTip as WCHAR ptr) as clong
declare function skCreateDW(byval hParent as HWND) as HWND
declare sub skDestroyDW(byref hDW as HWND)
declare function skDialogAlert(byval zCaption as WCHAR ptr, byval zMessage as WCHAR ptr, byval zButton as WCHAR ptr) as clong
declare function skDialogError(byval zCaption as WCHAR ptr, byval zMessage as WCHAR ptr, byval zButton as WCHAR ptr) as clong
declare function skDialogInfo(byval zCaption as WCHAR ptr, byval zMessage as WCHAR ptr, byval zButton as WCHAR ptr) as clong
declare function skDialogYesNo(byval zCaption as WCHAR ptr, byval zMessage as WCHAR ptr, byval zButton as WCHAR ptr) as clong
declare function skDialogInput(byval zCaption as WCHAR ptr, byval zMessage as WCHAR ptr, byval zButton as WCHAR ptr) as WCHAR ptr
declare function skButtonImage(byval hOwner as HWND, byval zFullpathImageName as WCHAR ptr, byval x as clong, byval y as clong, byval ButID as clong, byval StateMax as clong) as HWND
declare function skPushButtonImage(byval hOwner as HWND, byval zFullpathImageName as WCHAR ptr, byval zLabel as WCHAR ptr, byval x as clong, byval y as clong, byval xW as clong, byval yH as clong, byval ButID as clong, byval Alignment as clong) as HWND
declare sub skSetToolTipText(byval hObj as HWND, byval zText as WCHAR ptr)
declare function skGetToolTipText(byval hObj as HWND) as WCHAR ptr
declare function skCreateToolTip(byval hObj as HWND, byval zText as WCHAR ptr) as HWND
declare sub skRemoveToolTip(byval hObj as HWND)
declare function skClockCtrl(byval hOwner as HWND, byval zFullpathImageName as WCHAR ptr, byval x as clong, byval y as clong, byval w as clong, byval h as clong, byval nID as clong, byval ARGB1 as clong, byval ARGB2 as clong, byval GMT as clong) as HWND
declare function skComputeAngleFromPoint(byval hWnd as HWND, byval mX as clong, byval mY as clong) as clong
declare sub skGaugeSetMinMax(byval hCtrl as HWND, byval nMin as clong, byval nMax as clong)
declare sub skGaugeGetMinMax(byval hCtrl as HWND, byref nMin as clong, byref nMax as clong)
declare sub skGaugeSetPos(byval hCtrl as HWND, byval nPos as clong, byval RedrawFlag as clong)
declare function skGaugeGetPos(byval hCtrl as HWND) as clong
declare function skKnobGauge(byval hOwner as HWND, byval zFullpathImageName as WCHAR ptr, byval x as clong, byval y as clong, byval w as clong, byval h as clong, byval ButID as clong, byval MinValue as clong, byval MaxValue as clong, byval UsePos as clong, byval StateMax as clong) as HWND
declare function skStaticImage(byval hOwner as HWND, byval zFullpathImageName as WCHAR ptr, byval x as clong, byval y as clong, byval w as clong, byval h as clong, byval nID as clong) as HWND
declare function skGetSystemMetrics(byval nMeasure as clong) as clong
declare function skSkiToDib(byval szFile as WCHAR ptr, byref nReserved as clong) as HBITMAP
declare function skTerminateProcess(byval szModule as WCHAR ptr) as clong
declare sub skPaintBrushBitmap(byval hDC as HDC, byval x as clong, byval y as clong, byval nWidth as clong, byval nHeight as clong, byval ARGBcolor as DWORD)
declare function skTrackbar(byval hOwner as HWND, byval zFullpathImageName as WCHAR ptr, byval x as clong, byval y as clong, byval tW as clong, byval tH as clong, byval ButID as clong, byval tMin as clong, byval tMax as clong, byval tVal as clong, byval ARGBcolor as clong) as HWND
declare function skGetTrackValue(byval hWnd as HWND) as clong
declare sub skSetTrackValue(byval hWnd as HWND, byval tVal as clong)
declare sub skSetLabelColor(byval hCtrl as HWND, byval ARGBcolor as clong)
declare function skDoNotSkinPopupMenu(byval nOnOff as clong, byval RW as clong) as clong
declare sub skMaximize(byval hWnd as HWND)
declare sub skRestore(byval hWnd as HWND)
declare sub skRestoreCaption(byval hWnd as HWND, byval nBool as BOOL)
declare sub skSetTrackRange(byval hWnd as HWND, byval tMin as clong, byval tMax as clong)
declare sub skGetTrackRange(byval hWnd as HWND, byref tMin as clong, byref tMax as clong)
declare function skGetSysColor(byval nC as clong) as clong
declare function skLabel(byval hOwner as HWND, byval zFullpathBackground as WCHAR ptr, byval zLabel as WCHAR ptr, byval x as clong, byval y as clong, byval xW as clong, byval yH as clong, byval ButID as clong, byval Alignment as clong) as HWND
declare function skGetLabelFont(byval hCtrl as HWND) as LONG_PTR
declare function SkGetSbVertBitmap() as HBITMAP
declare function SkGetSbHorzBitmap() as HBITMAP
declare function SkGetSbPictoBitmap() as HBITMAP
declare sub skPaintButton(byval hDC as HDC, byval nB as clong, byval hBmp as HBITMAP, byval nX as clong, byval nY as clong, byval xWidth as clong, byval yHeight as clong)
declare sub DrawPicto(byval hDC as HDC, byval nB as clong, byval nX as clong, byval nY as clong, byval xWidth as clong, byval yHeight as clong)
declare sub skSetSystemMetrics(byval nMeasure as clong, byval UseValue as clong)
declare sub skRedrawNcArea(byval hWnd as HWND)
declare function skMinTrackSizeX(byval hWnd as HWND) as clong
declare function skMinTrackSizeY(byval hWnd as HWND) as clong
declare function skInitEngine(byval zSkinFile as WCHAR ptr, byval zUserKey as WCHAR ptr) as clong
declare function skUseThisBackground(byval hWnd as HWND, byval zItem as WCHAR ptr) as clong
declare sub skGetClientSize(byval hWnd as HWND, byref xClient as clong, byref yClient as clong, byref ClientWidth as clong, byref ClientHeight as clong)

const AT_TOP as const long = 1
const AT_LEFT as const long = 2
const AT_RIGHT as const long = 4
const AT_BOTTOM as const long = 8
const AT_TOPLEFT as const long = 3
const AT_TOPRIGHT as const long = 5
const AT_BOTTOMLEFT as const long = 10
const AT_BOTTOMRIGHT as const long = 12
const AT_ALL as const long = 15
const DOCK_TOP as const long = 256
const DOCK_LEFT as const long = 512
const DOCK_RIGHT as const long = 1024
const DOCK_BOTTOM as const long = 2048
const DOCK_FILL as const long = 3840
const CANCELMODE as const long = -1
const ANCHORMODE as const long = 32
const HOMOTHETIC as const long = 64

declare function skAnchorInit(byval hWnd as HWND) as BOOL
declare function skAnchorResize(byval hWnd as HWND, byval bRepaint as BOOL) as BOOL
declare function skAnchorID(byval hWnd as HWND, byval uID as UINT, byval uFlag as UINT) as BOOL
declare function skAnchorRemoveAll(byval hWnd as HWND) as BOOL
declare function skUseAnchorMode(byval hWnd as HWND, byval UseMode as clong) as clong
declare sub skSetListViewImage(byval FullPathName as WCHAR ptr, byval ReadWriteFlag as clong)
declare sub skSetToolBarImage(byval FullPathName as WCHAR ptr, byval ReadWriteFlag as clong)
declare sub skGetWindowSize(byval hWnd as HWND, byref x as clong, byref y as clong, byref WindowWidth as clong, byref WindowHeight as clong)
declare function skSkinChange(byval zSkinFile as WCHAR ptr) as BOOL

end extern
Patrice Terrier
Posts: 19
Joined: Jan 06, 2006 8:27
Location: France
Contact:

Re: Linked with external 64-bit Unicode C/C++ Visual Studio DLL

Post by Patrice Terrier »

Thank you very much, I shall test it tomorrow!
srvaldez
Posts: 3648
Joined: Sep 25, 2005 21:54

Re: Linked with external 64-bit Unicode C/C++ Visual Studio DLL

Post by srvaldez »

Patrice Terrier wrote: Jun 11, 2025 17:52 PS: I do not know FBfrog.
sorry for omission, https://github.com/freebasic/fbfrog

I launch the console, cd into the folder where fbfrog.exe resides and then type:
fbfrog -target win64
and then drag&drop the header onto the console to get something like the following
fbfrog -target win64 C:\Users\Admin\Desktop\Winlift\WinLIFT.h
Patrice Terrier
Posts: 19
Joined: Jan 06, 2006 8:27
Location: France
Contact:

Re: Linked with external 64-bit Unicode C/C++ Visual Studio DLL

Post by Patrice Terrier »

I couldn't create it

d:\FreeBASIC\fbfrog-master>fbc64 src\*.bas -m fbfrog
src\c-pp.bas(43) error 23: File not found, "crt.bi" in '#include once "crt.bi"'

Could you give me a direct link to the fbfrog.exe binary.
PaulSquires
Posts: 1035
Joined: Jul 14, 2005 23:41

Re: Linked with external 64-bit Unicode C/C++ Visual Studio DLL

Post by PaulSquires »

@Patrice Terrier Fantastic to have you here. Legend!
Patrice Terrier
Posts: 19
Joined: Jan 06, 2006 8:27
Location: France
Contact:

Re: Linked with external 64-bit Unicode C/C++ Visual Studio DLL

Post by Patrice Terrier »

@srvaldez

I am unable to download the archive, Windows 11 says "Virus detected"
dodicat
Posts: 8267
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Linked with external 64-bit Unicode C/C++ Visual Studio DLL

Post by dodicat »

No download problem here on win 11.
The download is sound, I have used fbfrog often enough, it was created by a former fb admin member called dkl.
I use Avast One antivirus, the free version of course, which is usually quite pernickety, but is happy with fbfrog.
Patrice Terrier
Posts: 19
Joined: Jan 06, 2006 8:27
Location: France
Contact:

Re: Linked with external 64-bit Unicode C/C++ Visual Studio DLL

Post by Patrice Terrier »

@dodicat
I am using Microsoft Defender that destroy the file as soon as downloaded.

@Paul
I am here, because of a José request, however not being able to link with a standard C header and a Microsoft .lib file definition is a real pain.
Mostly because I couldn't find a tutorial on how to process.
Patrice Terrier
Posts: 19
Joined: Jan 06, 2006 8:27
Location: France
Contact:

Re: Linked with external 64-bit Unicode C/C++ Visual Studio DLL

Post by Patrice Terrier »

Here is the full WinLIFT.h 7.01 header I would like to convert to FreeBasic.
UNICODE strings and 64-bit

Code: Select all

#include <windows.h>

#define C_IMPORT extern "C" __declspec(dllimport)

const int ANCHOR_NONE                = -1;
const int ANCHOR_LEFT                = 0;//ANCHOR_NONE;
const int ANCHOR_WIDTH               = 1;
const int ANCHOR_RIGHT               = 2;
const int ANCHOR_CENTER_HORZ         = 3;
const int ANCHOR_HEIGHT              = 4;
const int ANCHOR_HEIGHT_WIDTH        = 5;
const int ANCHOR_HEIGHT_RIGHT        = 6;
const int ANCHOR_BOTTOM              = 7;
const int ANCHOR_BOTTOM_WIDTH        = 8;
const int ANCHOR_BOTTOM_RIGHT        = 9;
const int ANCHOR_CENTER_HORZ_BOTTOM  = 10;
const int ANCHOR_CENTER_VERT         = 11;
const int ANCHOR_CENTER_VERT_RIGHT   = 12;
const int ANCHOR_CENTER              = 13;
const int ANCHOR_LAST                = ANCHOR_CENTER;

const int SK_METRICFIRST      = 0;
const int SK_CYCAPTION        = SK_METRICFIRST;
const int SK_CYMENU           = 1;
const int SK_CYSTATUS         = 2;
const int SK_CXFRAMELEFT      = 3;
const int SK_CXFRAMERIGHT     = 4;
const int SK_CYFRAMETOP       = SK_CYCAPTION;
const int SK_CYFRAMEBOTTOM    = 5;
const int SK_CXSIZE           = 6;
const int SK_CYSIZE           = 7;
const int SK_CXSYSBUT         = 8;
const int SK_CYSYSBUT         = 9;
const int SK_CXCAPTEXT        = 10;
const int SK_CYCAPTEXT        = 11;
const int SK_XBUT3DBORDER     = 12;
const int SK_YBUT3DBORDER     = 13;
const int SK_CXSYSICON        = 14;
const int SK_CYSYSICON        = 15;
const int SK_CXSYSLED         = 16;
const int SK_CYSYSLED         = 17;
const int SK_TRANSLUCENCY     = 18;
const int SK_MENUTRANSLUCENCY = 19;
const int SK_PAINT_BORDER     = 20;
const int SK_PAINT_BACKGROUND = 21;
const int SK_ICONSIZE         = 22;
const int SK_OUTER_GLOW       = 23;
const int SK_SKIN_ICON        = 24;
const int SK_DWM_AERO         = 25;
const int SK_DWM_LEFT         = 26;
const int SK_DWM_TOP          = 27;
const int SK_DWM_RIGHT        = 28;
const int SK_DWM_BOTTOM       = 29;
const int SK_USESYSMENU       = 30;
const int SK_DPI              = 31;
const int SKMETRIC_UB         = 32;

C_IMPORT HWND     skPopupOwner (IN HWND hWnd);
C_IMPORT HFONT    skCaptionFont ();
C_IMPORT HFONT    skFont ();
C_IMPORT HFONT    skFontBold ();
C_IMPORT HFONT    skFontDlg ();
C_IMPORT LONG_PTR skCaptionFontPlus ();
C_IMPORT LONG_PTR skFontPlus ();
C_IMPORT LONG_PTR skFontBoldPlus ();
C_IMPORT LONG_PTR skFontDlgPlus ();
C_IMPORT void     skSkinDisable (IN HWND hWnd);
C_IMPORT void     skSetZorder (IN HWND hWnd, IN HWND UseOrder);
C_IMPORT HDC      skGetHdcMemBmp (IN HWND hOwner);
C_IMPORT DWORD    skARGB (IN BYTE A, IN BYTE R, IN BYTE G, IN BYTE B);
C_IMPORT void     ComputeAspect (IN long xPic, IN long yPic, IN long xCell, IN long yCell, OUT long &xP, OUT long &yP, OUT long &xS, OUT long &yS);
C_IMPORT void     skChildOffset (IN HWND hWnd, OUT long &ofX, OUT long &ofY);
C_IMPORT void     skSetLabelFont (IN HWND hCtrl, IN WCHAR* zFontName, IN WORD nFontSize, IN long ARGBcolor, IN WORD nFontStyle, IN BOOL redraw);
C_IMPORT WCHAR*   skVersion ();
C_IMPORT long     skSetAnchorCtrl (IN HWND hWnd, IN long AnchorMode);
C_IMPORT long     skUsingDWM ();
C_IMPORT WCHAR*   skSkinFolder ();
C_IMPORT HWND     skButImage (IN HWND hOwner, OUT HBITMAP hBitmap, IN long xLeft, IN long yLeft, IN long ButID);
C_IMPORT WCHAR*   skAuthor ();
C_IMPORT HWND     skBorder (IN HWND hWnd, IN long x, IN long y, IN long xW, IN long yH, IN long nID, IN long nBorder);
C_IMPORT void     skSkinChildCtrl (IN HWND hWnd, IN long RedrawFlag);
C_IMPORT void     skSkinEnable (IN HWND hWnd);
C_IMPORT void     skRedrawMenuBar(IN HWND hWnd);
C_IMPORT HMENU    skGetMenu (IN HWND hWnd);
C_IMPORT HWND     skMenuContainer (IN HWND hWnd);
C_IMPORT void     skSkinWindowUpdate (IN HWND hWnd, IN long RedrawFlag);
C_IMPORT long     skSkinWindow (IN HWND hWnd, WCHAR* zSysButTip);
C_IMPORT HWND     skCreateDW (IN HWND hParent);
C_IMPORT void     skDestroyDW (OUT HWND &hDW);
C_IMPORT long     skDialogAlert (IN WCHAR* zCaption, IN WCHAR* zMessage, IN WCHAR* zButton);
C_IMPORT long     skDialogError (IN WCHAR* zCaption, IN WCHAR* zMessage, IN WCHAR* zButton);
C_IMPORT long     skDialogInfo (IN WCHAR* zCaption, IN WCHAR* zMessage, IN WCHAR* zButton);
C_IMPORT long     skDialogYesNo (IN WCHAR* zCaption, IN WCHAR* zMessage, IN WCHAR* zButton);
C_IMPORT WCHAR*   skDialogInput (IN WCHAR* zCaption, IN WCHAR* zMessage, IN WCHAR* zButton);
C_IMPORT HWND     skButtonImage (IN HWND hOwner, IN WCHAR* zFullpathImageName, IN long x, IN long y, IN long ButID, IN long StateMax);
C_IMPORT HWND     skPushButtonImage (IN HWND hOwner, IN WCHAR* zFullpathImageName, IN WCHAR* zLabel, IN long x, IN long y, IN long xW, IN long yH, IN long ButID, IN long Alignment);
C_IMPORT void     skSetToolTipText (IN HWND hObj, IN WCHAR* zText);
C_IMPORT WCHAR*   skGetToolTipText (IN HWND hObj);
C_IMPORT HWND     skCreateToolTip (IN HWND hObj, IN WCHAR* zText);
C_IMPORT void     skRemoveToolTip (IN HWND hObj);
C_IMPORT HWND     skClockCtrl (IN HWND hOwner, IN WCHAR* zFullpathImageName, IN long x, IN long y, IN long w, IN long h, IN long nID, IN long ARGB1, IN long ARGB2, IN long GMT);
C_IMPORT long     skComputeAngleFromPoint(IN HWND hWnd, IN long mX, IN long mY);
C_IMPORT void     skGaugeSetMinMax (IN HWND hCtrl, IN long nMin, IN long nMax);
C_IMPORT void     skGaugeGetMinMax (IN HWND hCtrl, OUT long &nMin, OUT long &nMax);
C_IMPORT void     skGaugeSetPos (IN HWND hCtrl, IN long nPos, IN long RedrawFlag);
C_IMPORT long     skGaugeGetPos (IN HWND hCtrl);
C_IMPORT HWND     skKnobGauge (IN HWND hOwner, IN WCHAR* zFullpathImageName, IN long x, IN long y, IN long w, IN long h, IN long ButID, IN long MinValue, IN long MaxValue, IN long UsePos, IN long StateMax);
C_IMPORT HWND     skStaticImage (IN HWND hOwner, WCHAR* zFullpathImageName, IN long x, IN long y, IN long w, IN long h, IN long nID);
C_IMPORT long     skGetSystemMetrics (IN long nMeasure);
C_IMPORT HBITMAP  skSkiToDib (IN WCHAR* szFile, OUT long &nReserved);
C_IMPORT long     skTerminateProcess (IN WCHAR* szModule);
C_IMPORT void     skPaintBrushBitmap (IN HDC hDC, IN long x, IN long y, IN long nWidth, IN long nHeight, IN DWORD ARGBcolor);
C_IMPORT HWND     skTrackbar (IN HWND hOwner, IN WCHAR* zFullpathImageName, IN long x, IN long y, IN long tW, IN long tH, IN long ButID, IN long tMin, IN long tMax, IN long tVal, IN long ARGBcolor);
C_IMPORT long     skGetTrackValue(IN HWND hWnd);
C_IMPORT void     skSetTrackValue(IN HWND hWnd, IN long tVal);
C_IMPORT void     skSetLabelColor (IN HWND hCtrl, IN long ARGBcolor);
C_IMPORT long     skDoNotSkinPopupMenu (IN long nOnOff, IN long RW);

C_IMPORT void     skMaximize(IN HWND hWnd); // 06-25-2015
C_IMPORT void     skRestore(IN HWND hWnd);  // 06-25-2015
C_IMPORT void     skRestoreCaption(IN HWND hWnd, IN BOOL nBool);  // 01-01-2017

C_IMPORT void     skSetTrackRange(IN HWND hWnd, IN long tMin, IN long tMax); // 09-09-2017
C_IMPORT void     skGetTrackRange(IN HWND hWnd, OUT long &tMin, OUT long &tMax); // 09-09-2017
C_IMPORT long     skGetSysColor(IN long nC); // 09-09-2017
C_IMPORT HWND     skLabel(IN HWND hOwner, IN WCHAR* zFullpathBackground, IN WCHAR* zLabel, IN long x, IN long y, IN long xW, IN long yH, IN long ButID, IN long Alignment); // 09-12-2017
C_IMPORT LONG_PTR skGetLabelFont(IN HWND hCtrl); // 2017-09-13

C_IMPORT HBITMAP  skGetSbVertBitmap();
C_IMPORT HBITMAP  skGetSbHorzBitmap();
C_IMPORT HBITMAP  skGetSbPictoBitmap();
C_IMPORT void     skPaintButton(IN HDC hDC, IN long nB, IN HBITMAP hBmp, IN long nX, IN long nY, IN long xWidth, IN long yHeight);
C_IMPORT void     DrawPicto(IN HDC hDC, IN long nB, IN long nX, IN long nY, IN long xWidth, IN long yHeight);
C_IMPORT void     skSetSystemMetrics(IN long nMeasure, IN long UseValue);

C_IMPORT void     skRedrawNcArea(IN HWND hWnd);

// 08-31-2023 Version 6.00
C_IMPORT long     skMinTrackSizeX(HWND hWnd);
C_IMPORT long     skMinTrackSizeY(HWND hWnd);
C_IMPORT long     skInitEngine (IN WCHAR* zSkinFile, IN WCHAR* zUserKey);
C_IMPORT long     skUseThisBackground(IN HWND hWnd, IN WCHAR* zItem);
C_IMPORT void     skGetClientSize(IN HWND hWnd, OUT long &xClient, OUT long &yClient, OUT long &ClientWidth, OUT long &ClientHeight);

const int AT_TOP         = 1;
const int AT_LEFT        = 2;
const int AT_RIGHT       = 4;
const int AT_BOTTOM      = 8;
const int AT_TOPLEFT     = 3;
const int AT_TOPRIGHT    = 5;
const int AT_BOTTOMLEFT  = 10;
const int AT_BOTTOMRIGHT = 12;
const int AT_ALL         = 15;

const int DOCK_TOP       = 256;
const int DOCK_LEFT      = 512;
const int DOCK_RIGHT     = 1024;
const int DOCK_BOTTOM    = 2048;
const int DOCK_FILL      = 3840;

const int CANCELMODE     = -1;
const int ANCHORMODE     = 32;
const int HOMOTHETIC     = 64;

C_IMPORT BOOL     skAnchorInit(HWND hWnd);
C_IMPORT BOOL     skAnchorResize(HWND hWnd, BOOL bRepaint);
C_IMPORT BOOL     skAnchorID(HWND hWnd, UINT uID, UINT uFlag);
C_IMPORT BOOL     skAnchorRemoveAll(HWND hWnd);
C_IMPORT long     skUseAnchorMode(HWND hWnd, IN long UseMode);
C_IMPORT void     skSetListViewImage(WCHAR* FullPathName, long ReadWriteFlag);
C_IMPORT void     skSetToolBarImage(WCHAR* FullPathName, long ReadWriteFlag);
C_IMPORT void     skGetWindowSize(IN HWND hWnd, OUT long &x, OUT long &y, OUT long &WindowWidth, OUT long &WindowHeight);
C_IMPORT BOOL     skSkinChange(IN WCHAR* zSkinFile);

const UINT USE_PREV =  0x00A2; // WM_NCLBUTTONUP
const UINT USE_NEXT =  0x00A5; // WM_NCRBUTTONUP
C_IMPORT void     skChangeBackground(UINT uMsg);
C_IMPORT void     skAbout();

C_IMPORT HWND     skCaptionTip(IN HWND hOwner, IN long nID, IN WCHAR* sText, IN RECT rc);
Josep Roca
Posts: 615
Joined: Sep 27, 2016 18:20
Location: Valencia, Spain

Re: Linked with external 64-bit Unicode C/C++ Visual Studio DLL

Post by Josep Roca »

Hi Patrice,

Didn't you tell me that your DLL uses fastproc as the calling convention? I'm not seeing __fastproc being used in the FreeBasic declarations.
Patrice Terrier
Posts: 19
Joined: Jan 06, 2006 8:27
Location: France
Contact:

Re: Linked with external 64-bit Unicode C/C++ Visual Studio DLL

Post by Patrice Terrier »

José

No, all my 64-bit DLLs are using the Calling Convention __fastcall (/Gr)
not fastproc that is a highly simplified form of sub or function (used in PowerBASIC)
Post Reply