News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Mixed language ASM C using the "Media Foundation" MF and so on library

Started by TouEnMasm, September 03, 2020, 10:55:20 PM

Previous topic - Next topic

TouEnMasm

Hello,
This one use a sample provided by microsoft to play radio but He can also show animation.
The method to create a mixed language application is very fast and simple.
In the C program,create proc who can call C++ proc and be also called by asm,like this
Quote
extern "C"  HRESULT __stdcall OpenURL(const WCHAR *sURL){
HRESULT hr;
hr = g_pPlayer->OpenURL(sURL);
return hr;
}   
The "extern "C" " made the proc undecorate,__stdcall is optionnal.IF not used declare a PROC C in asm.
DATA can be shared   using EXTERNDEF in the  both languages.
There is no need of a library,an object file is enough,add it at link time.
You need just to declare the prototypes created in  the C part.(see player.inc).
An asm program with a window is enough to allow you made all you want.

The listbox is waiting your own list and is empty
The VC_tuner directory content the original microsoft sample

Fa is a musical note to play with CL

TouEnMasm

Here The finished appli with a modifiable list of radio
Listeradio.txt must be in the same path as the .exe
Fa is a musical note to play with CL