Sign in to follow this  
Guest JeanLuc_

Borland Compiled gauges and Windows XP

Recommended Posts

Hallo together,I followed the last Threads about the Borland C++ 5.5 Freeware compiled gauge. All gauges work at Windows 98 and Windows 2000, but not at XP! IF you include the gauge into the panel of the standard aircraft, the FS crashes immediatly.So I added the following lines you mentioned: -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 to the makefile and to the bcc32.cfg, as I found out after a few researches in the internet. Neiter a Fs2000 nor a Fs2002 gauge works on the XP system.But the Problem remains! It didn't change anything. Here is the complete code.Please give me a tipp what could be wrong. Thank you very very much!Marcel Burr---------bcc32.cfg-------------------------------------I"E:Borlandbcc55include"-L"E:Borlandbcc55lib"-DWINVER=0x0400 -D_WIN32_WINNT=0x0400 ----------------------------------------------------------------gauges_bcc.def--------------------------------HEAPSIZE 10000000STACKSIZE 10000000EXPORTS Linkage=_Linkage ImportTable=_ImportTable-----------------------------------------------------------------makefile--------------------------------------GAU_NAME = EasyGaugeADD_LIBS=ADD_OBJS=ADD_DEPS=..incgaugesFS2002.hADD_RESS=rtl=IMPORT32.LIB CW32.LIBinit_module=c0d32x.objdeffile=gauges_bcc.defGAU_OBJS=$(GAU_NAME).obj $(ADD_OBJS)GAU_RESS=$(GAU_NAME).res $(ADD_RESS)GAU_LIBS=$(ADD_LIBS)GAU_DEPS=$(GAU_NAME).c $(GAU_NAME).h Makefile $(ADD_DEPS)RES_DEPS=$(GAU_NAME).rc $(GAU_NAME).h MakefileCC=bcc32CFLAGS=-O2 -w-par -q -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 CPP=cpp32CPPFLAGS=-q -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 LD=ilink32LDFLAGS=/Tpd /c /C /Gn /w /x /q RC=brcc32RCFLAGS=$(GAU_NAME).gau: $(GAU_OBJS) $(GAU_LIBS) $(GAU_RESS) $(LD) $(LDFLAGS) $(init_module) $(GAU_OBJS), $@,,$(GAU_LIBS) $(rtl),$(deffile),$(GAU_RESS)$(GAU_NAME).obj: $(GAU_DEPS) $(CC) $(CFLAGS) -c $(GAU_NAME).c$(GAU_NAME).res: $(RES_DEPS) $(CPP) $(CPPFLAGS) -otmp.rc $(GAU_NAME).rc $(RC) $(RCFLAGS) -fo $(GAU_NAME).res tmp.rc del tmp.rc-----------------------------------------------------------------------------------EasyGauge.c----------------------------------#include "..incgaugesFS2002.h"#include "EasyGauge.h"#include #define GAUGE_NAME "EasyGauge0"#define GAUGEHDR_VAR_NAME gaugehdr_EasyGauge#define GAUGE_W 100#include "EasyGaugeG.c"GAUGE_TABLE_BEGIN() GAUGE_TABLE_ENTRY(&gaugehdr_EasyGauge)GAUGE_TABLE_END()------------------------------------------------------------------------------------EasyGaugeG.c--------------------------------char EasyGauge_gauge_name[] = GAUGE_NAME;extern PELEMENT_HEADER EasyGauge_list;extern MOUSERECT EasyGauge_mouse_rect[];GAUGE_CALLBACK gaugecall;GAUGE_HEADER_FS700(GAUGE_W, EasyGauge_gauge_name, &EasyGauge_list, EasyGauge_mouse_rect, gaugecall, 0, 0, 0);#define GAUGE_CHARSET2 DEFAULT_CHARSET#define GAUGE_FONT_DEFAULT2 "Courier New"#define GAUGE_WEIGHT_DEFAULT2 FW_THINint FIRST_RUN=0;void FSAPI gaugecall(PGAUGEHDR pgauge, int service_id, UINT32 extra_data){switch(service_id){case PANEL_SERVICE_PRE_INITIALIZE:break;case PANEL_SERVICE_PRE_KILL:break;case PANEL_SERVICE_PRE_UPDATE:break;case PANEL_SERVICE_PRE_DRAW:if (FIRST_RUN==0) {FIRST_RUN=1;}break;case PANEL_SERVICE_PRE_INSTALL:break;}}MOUSE_BEGIN(EasyGauge_mouse_rect,0,0,0)MOUSE_ENDFAILURE_RECORD fail2[] = {{FAIL_NONE, FAIL_ACTION_NONE}};FAILURE_RECORD fail1[] = {{FAIL_NONE, FAIL_ACTION_NONE}};NONLINEARITY Nonlin2[] = {{{95, 21}, 0, 0},{{29, 46}, 240, 0},};FLOAT64 FSAPI callback2( PELEMENT_NEEDLE pelement){FLOAT64 rwert=pelement->source_var.var_value.n;if ( rwert > 240 ) { rwert = 240 ; } if ( rwert 80,3,4,AIRSPEED,callback2,Nonlin2,0)PELEMENT_HEADER ElementList2[] = {&Needle2.header,NULL};MAKE_STATIC(Static1,Rec0,&ElementList2,fail1,IMAGE_USE_ERASE | IMAGE_USE_TRANSPARENCY,0,0,0)PELEMENT_HEADER EasyGauge_list = &Static1.header;-------------------------------------------------------------------------------EasyGauge.h----------------------------------#define VERSION_MAJOR 1#define VERSION_MINOR 0#define VERSION_BUILD 0#define lita(arg) #arg#define xlita(arg) lita(arg)#define cat3(w,x,z) w##.##x##.##z##000#define xcat3(w,x,z) cat3(w,x,z)#define VERSION_STRING xlita(xcat3(VERSION_MAJOR,VERSION_MINOR,VERSION_BUILD))#ifndef VS_VERSION_INFO#define VS_VERSION_INFO 0x0001#endif#define Rec0 0x100#define Rec1 0x1100----------------------------------------------------------------------------------EasyGauge.rc--------------------------------------#include"EasyGauge.h"VS_VERSION_INFO VERSIONINFO FILEVERSION VERSION_MAJOR,VERSION_MINOR,0,VERSION_BUILD PRODUCTVERSION VERSION_MAJOR,VERSION_MINOR,0,VERSION_BUILD FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x10004L FILETYPE 0x1L FILESUBTYPE 0x0LBEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "Bluesky developement0" VALUE "FileDescription", "Created with EASYGAUGE for Simulation0" VALUE "FileVersion", VERSION_STRING VALUE "LegalCopyright", "It is prohibited to make money with this gauge, but distributing as freeware is allowed. Contact bluesky for further information.0" VALUE "ProductName", "EasyGauge0" VALUE "ProductVersion", VERSION_STRING END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 ENDENDRec0 BITMAP DISCARDABLE "E:BlueskyEasyGaugeWorkshopSpeedometer01.bmp"Rec1 BITMAP DISCARDABLE "E:BlueskyEasyGaugeWorkshopNeedle01.bmp"-------------------------------------------------------------THANK YOU!Greetings,Marcel Burr

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi Marcel,here is what I use and that works:rtl=IMPORT32.LIB cw32mt.lib uuid.libinit_module=c0d32x.obj# the compilers and the linker with their optionsCC=bcc32CFLAGS=-O2 -w-par -q -5 -tWD -DWINVER=0x0400 -D_WIN32_WINNT=0x0400CPP=cpp32CPPFLAGS=-qLD=ilink32LDFLAGS=/Tpd /c /C /Gn /x /qRC=brcc32RCFLAGS=---------------------------Hope it helps!

Share this post


Link to post
Share on other sites

Hi Jean,thank you for your Tipps. But do the gauges now keep on working at Win98? I think the lines -tWD -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 make them only compatible to verions upon Windows 2000!That is of course not my aim. They must work everywhere!Thank you for your helpGreetings,Marcel

Share this post


Link to post
Share on other sites

This on the contrary make them work on every system. BorlandC defaults to win2000 only. Believe me, this do work.Give it a try!

Share this post


Link to post
Share on other sites

Hi Jean,thank you for your Tip, I did not get the respond of a tester if it works now yet.But just for fun, I compiled one gauge WITHOUT your lines (WINVER=....), and on this XP system, it works! It also works at Win98, so the Borland C seems not to default to win2000.Greetings,Marcel

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this