Search found 24 matches

by E Dingsor
Aug 17, 2023 13:19
Forum: Windows
Topic: Updated FB skeleton code for making generic XLL files for use with Excel 32/64 Bit
Replies: 0
Views: 1419

Updated FB skeleton code for making generic XLL files for use with Excel 32/64 Bit

Updated:
Translated C code to FB for making generic add-ins(XLL files) for use with Excel 32/64 bit

see link:
https://www.planetsquires.com/protect/f ... pic=4152.0
by E Dingsor
Dec 27, 2019 8:37
Forum: Libraries Questions
Topic: [Solved]Where to get libJson-c. a file
Replies: 1
Views: 1122

Re: Where to get libJson-c. a file

I've compiled the static Json-c Win32 library . It can be found here:
https://www.planetsquires.com/protect/f ... pic=4369.0
\E
by E Dingsor
Dec 20, 2019 13:29
Forum: Libraries Questions
Topic: [Solved]Where to get libJson-c. a file
Replies: 1
Views: 1122

[Solved]Where to get libJson-c. a file

Looking for a place to find Json-c lib file (the include libray)for use with Json-c header files that comes with Freebasic 1.07 win32 compiler. Or do I have to find the correct c-source and compile it myself with GCC. The url to website in help file is broken.
Eigil
by E Dingsor
Dec 11, 2019 19:16
Forum: Windows
Topic: [Solved] :Function pointers , Conversion from C , see last posting
Replies: 17
Views: 5646

Solved : Re: Function pointers , Conversion from C

Hi, Just got time to revisit my challenge. Couldn't just give in and continue using a static library with compiled C code. Found the culprit: typedef int ( PASCAL *EXCEL12PROC) (int xlfn, int coper, LPXLOPER12 *rgpxloper12, LPXLOPER12 xloper12Res) Pascal should be translated into STDCALL convention ...
by E Dingsor
May 06, 2019 13:25
Forum: Windows
Topic: How to use correct Common Shared syntax?
Replies: 17
Views: 9467

Re: How to use correct Common Shared syntax?

Gotcha. Tx!
\E
by E Dingsor
May 06, 2019 12:41
Forum: Windows
Topic: How to use correct Common Shared syntax?
Replies: 17
Views: 9467

Re: How to use correct Common Shared syntax?

Hmmm... compiler still throws error code 4: Here's two example files that generates the error: Commontest.bas #include "test2.bas" common shared ival as long dim shared ival as long = 10 print mytest(23) sleep end test2.bas common shared ival as long function mytest(inval as long) as long ...
by E Dingsor
May 06, 2019 11:45
Forum: Windows
Topic: How to use correct Common Shared syntax?
Replies: 17
Views: 9467

How to use correct Common Shared syntax?

Hi, Trying to use a variable over multiple modules, but the compiler(1.06 Win) throws error code 4 back: Duplicated definition, g_hInst in 'common shared g_hInst as HINSTANCE Help file says: Variable declaration and scope modifier Syntax Common [Shared] symbolname[()] [AS DataType] [, ...] Descripti...
by E Dingsor
Nov 13, 2018 6:44
Forum: Windows
Topic: Array as optional parameter
Replies: 5
Views: 1808

Solved: Array as optional parameter

Made the "optional" route work with passing an array and checking upper bound like this. Function BusinessdaysBetween(lStartdate as long, lEndDate as long, lHolidays() as long) as long dim bHoliday as Boolean 'if array with holidays is passed "empty" the lHols() array will be not...
by E Dingsor
Nov 05, 2018 13:20
Forum: Windows
Topic: Array as optional parameter
Replies: 5
Views: 1808

Re: Array as optional parameter

Hi,
Thanks for valuable suggestions. I'm porting some code from PowerBasic and hoped to avoid going down the pointer route, but it seems that is the way to go.
\e
by E Dingsor
Nov 05, 2018 10:51
Forum: Windows
Topic: Array as optional parameter
Replies: 5
Views: 1808

Array as optional parameter

Hi, I'm trying to make a function with an Optional Array parameter, but compiler throws out Error 59: Illegal specification.. Is it possible to have an optional array parameter? I've tried these variants, but all give me Error 59 FUNCTION BusinessDays(lStartDate AS LONG, lEndDate AS LONG, lHols() AS...
by E Dingsor
May 14, 2018 18:58
Forum: Windows
Topic: FB skeleton code for making generic XLL files for use with Excel 32 Bit
Replies: 2
Views: 2291

FB skeleton code for making generic XLL files for use with Excel 32 Bit

Translated C code to FB for making generic add-ins(XLL files) for use with Excel 32 bit

see link:
http://www.planetsquires.com/protect/fo ... pic=4152.0
by E Dingsor
Feb 14, 2018 18:26
Forum: Windows
Topic: [Solved] :Function pointers , Conversion from C , see last posting
Replies: 17
Views: 5646

Re: Function pointers , Conversion from C

Hi,
Couldn't spend more time on trying to get it going. Used too much time already. Maybe I'll revisit task later.
Had to throw in the towel and compile xlcall.cpp file into an .o file and then convert .o file into .a static lib lib with ar.exe.

thanks again for all help and suggestions.
\E
by E Dingsor
Feb 12, 2018 7:02
Forum: Windows
Topic: [Solved] :Function pointers , Conversion from C , see last posting
Replies: 17
Views: 5646

Re: Function pointers , Conversion from C

Hi, Thanks for trying to help out. The converted code with EXCEL12PROC as Type still GPF's at line mdRet = pexcel12(_xlfn, count, @rgxloper12(0), operRes) . Excel calls into the xll file, but GPF's when trying to access memory. The excel12proc should be executed at the memory address of pexcel12 whi...
by E Dingsor
Feb 09, 2018 7:27
Forum: Windows
Topic: [Solved] :Function pointers , Conversion from C , see last posting
Replies: 17
Views: 5646

Re: Function pointers , Conversion from C

Hi,
Code didn't work. GPF's.
Have to dig some more on how to excecute the (byval lxlfn AS LONG, byval coper AS Long, rgpxloper12 AS LPXLOPER12 , BYVAL xloper12Res AS LPXLOPER12) at the memory address of pexcel12 (i.e entry point).
\E
by E Dingsor
Feb 08, 2018 11:23
Forum: Windows
Topic: [Solved] :Function pointers , Conversion from C , see last posting
Replies: 17
Views: 5646

Re: Function pointers , Conversion from C

Hi srvaldez, I'm away from the PC with FB installed, but I did try something similar and it didn't work. Do you mean that I don't have to assign function pointer pexcel12 to the typedef int (PASCAL *EXCEL12PROC) (int xlfn, int coper, LPXLOPER12 *rgpxloper12, LPXLOPER12 xloper12Res); at all? I have d...