inline

Previous topic - Next topic

Hemlos

how do i get this to work?

And how do i get NULL into the declaration?

linking:
gpc_temp0.o:gpc_temp0.cpp:(.text+0x568): undefined reference to `_mciSendString@16'
gpc_temp0.o:gpc_temp0.cpp:(.text+0x2021): undefined reference to `_mciSendString@16'
*** FATAL ERROR - Please post this output in the forum

Code (glbasic) Select
FUNCTION foo:
ENDFUNCTION

INLINE
}
extern "C" int __stdcall mciSendString(const char*,int,int,void*);
namespace __GLBASIC__
{
ENDINLINE

FUNCTION api:


a$="open tabs.mid type mpegvideo alias MediaFile";
b=0
c=0
INLINE
mciSendString(a_Str.c_str(),b,c,GLBASIC_HWND());
ENDINLINE
ENDFUNCTION

Bing ChatGpt is pretty smart :O

Kitty Hello

is it mciSendStringA (for ASCII version?)

Hemlos

Should i use the ascii command instead?
Bing ChatGpt is pretty smart :O

Kitty Hello

Mostly all functions from the Windows API are either ascii (A) or unicode (W) functions. The function names w/o A/W are just macros depending on your _UNICODE #define variable.
So, yes. You must use the "A" version.

Hemlos

#4
Sweet thanks, i got the fullscreen mode for movies to work with this!
Oh and BTW ,it plays midi files...one time.
Code (glbasic) Select

PLAYONCE()
SHOWSCREEN
MOUSEWAIT
END

FUNCTION foo:
ENDFUNCTION
INLINE
}
extern "C" int __stdcall mciSendStringA(const char*,int,int,void*);
namespace __GLBASIC__
{
ENDINLINE
FUNCTION PLAYONCE:
a$="play test.avi fullscreen";
b=0;
c=0;
INLINE
mciSendStringA(a_Str.c_str(),b,c,GLBASIC_HWND());
ENDINLINE
PRINT a$+" "+b+" "+c,10,10
ENDFUNCTION
Bing ChatGpt is pretty smart :O