The MASM Forum

Miscellaneous => Miscellaneous Projects => Topic started by: TouEnMasm on September 03, 2020, 10:55:20 PM

Title: Mixed language ASM C using the "Media Foundation" MF and so on library
Post by: TouEnMasm on September 03, 2020, 10:55:20 PM
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

Title: Re: Mixed language ASM C using the "Media Foundation" MF and so on library
Post by: TouEnMasm on September 04, 2020, 02:31:52 AM
Here The finished appli with a modifiable list of radio
Listeradio.txt must be in the same path as the .exe