Strange, Windows app working in Linux?

Linux specific forum
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Strange, Windows app working in Linux?

Post by GeoTrail »

I was messing around on my backup drives and was testing to launch a few test programs I wrote for Windows some time ago. And some of them actually work perfectly. I haven't, that I know of, installed any emulators or anything like that. Just launched the program and it works.

Here's the code of one of the programs that works, it uses Windows API of all things

Code: Select all

Result = MessageBox_(0,"This is the text","This is the caption",#MB_CANCELTRYCONTINUE|#MB_ICONINFORMATION|#MB_DEFBUTTON2)



Select Result

	Case #IDABORT		; Abort button was selected.

		Selected$ = "IDABORT"

		MessageBox_(0,"You select " + Selected$ + ".","Result",#MB_OK)

	Case #IDCANCEL		; Cancel button was selected.

		Selected$ = "IDCANCEL"

		MessageBox_(0,"You select " + Selected$ + ".","Result",#MB_OK)

; 	Case #IDCONTINUE	; Continue button was selected.

; 		Selected$ = "IDCONTINUE"

; 		MessageBox_(0,"You select " + Selected$ + ".","Result",#MB_OK)

	Case #IDIGNORE		; Ignore button was selected.

		Selected$ = "IDIGNORE"

		MessageBox_(0,"You select " + Selected$ + ".","Result",#MB_OK)

	Case #IDNO			; No button was selected.

		Selected$ = "IDNO"

		MessageBox_(0,"You select " + Selected$ + ".","Result",#MB_OK)

	Case #IDOK			; OK button was selected.

		Selected$ = "IDOK"

		MessageBox_(0,"You select " + Selected$ + ".","Result",#MB_OK)

	Case #IDRETRY		; Retry button was selected.

		Selected$ = "IDRETRY"

		MessageBox_(0,"You select " + Selected$ + ".","Result",#MB_OK)

; 	Case #IDTRYAGAIN 	; Try Again button was selected.

; 		Selected$ = "IDTRYAGAIN"

; 		MessageBox_(0,"You select " + Selected$ + ".","Result",#MB_OK)

	Case #IDYES			; Yes button was selected.

		Selected$ = "IDYES"

		MessageBox_(0,"You select " + Selected$ + ".","Result",#MB_OK)

	Default

		Selected$ = Str( Result )

		MessageBox_(0,"You select " + Selected$ + ".","Result",#MB_OK)		

EndSelect





End

;- End of program



; IDE Options = PureBasic v4.01 (Windows - x86)

; Folding = -

; Executable = API_MessageBox.exe
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
WishMaster
Enthusiast
Enthusiast
Posts: 277
Joined: Fri Jun 17, 2005 7:13 pm
Location: Franconia
Contact:

Post by WishMaster »

Code: Select all

user@linux:~> /usr/share/purebasic/compilers/pbcompiler /your/test/file.pb

******************************************
PureBasic 4.00 - Beta 1 (Linux - x86)
******************************************

Loading external modules...
Starting compilation...
Error: Line 1 - MessageBox_() is not a function, array, macro or linked list
user@linux:~>
Image Image
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Post by GeoTrail »

No I have already compiled the code in Windows. The compiled exe is for Windows, but it works here.

Try this http://robert.geotrail.no/API_MessageBox.exe
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

it's probably run with wine.
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Post by GeoTrail »

Aaa yeah I searched in the package manager and Wine Windows Emulator is installed. Pretty cool that it works though. Many Windows installations works too. Just tried a few just for fun.
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
Post Reply