News:

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

Main Menu

a game with line prototype and conditions

Started by TouEnMasm, September 29, 2014, 02:40:14 AM

Previous topic - Next topic

TouEnMasm


I am trying to put the following lines in order to be translated for masm.

Quote
int
#if !defined(_MAC)
#if defined(_M_CEE_PURE)
__clrcall
#else
WINAPI
#endif
#else
CALLBACK
#endif
WinMain (
    _In_ HINSTANCE hInstance,
    _In_opt_ HINSTANCE hPrevInstance,
    _In_ LPSTR lpCmdLine,
    _In_ int nShowCmd
    );


one not to much difficult exercice
Quote
KSECDDDECLSPEC
SECURITY_STATUS SEC_ENTRY
QuerySecurityPackageInfoW(
#if ISSP_MODE == 0
                PSECURITY_STRING pPackageName,
#else
                LPWSTR pszPackageName,          // Name of package
#endif
    _Outptr_ PSecPkgInfoW *ppPackageInfo     // Receives package info
    );

Modify form

Quote
#if ISSP_MODE == 0
KSECDDDECLSPEC
SECURITY_STATUS SEC_ENTRY
QuerySecurityPackageInfoW(
   PSECURITY_STRING pPackageName,
    _Outptr_ PSecPkgInfoW *ppPackageInfo     // Receives package info
    );
#else
KSECDDDECLSPEC
SECURITY_STATUS SEC_ENTRY
QuerySecurityPackageInfoW(
                LPWSTR pszPackageName,          // Name of package
    _Outptr_ PSecPkgInfoW *ppPackageInfo     // Receives package info
    );
#endif


Any idea ?
Fa is a musical note to play with CL

dedndave

    #if defined(_MAC)
        int CALLBACK WinMain (
                       _In_ HINSTANCE hInstance,
                       _In_opt_ HINSTANCE hPrevInstance,
                       _In_ LPSTR lpCmdLine,
                       _In_ int nShowCmd
                        );
    #else
        #if defined(_M_CEE_PURE)
            int __clrcall WinMain (
                            _In_ HINSTANCE hInstance,
                            _In_opt_ HINSTANCE hPrevInstance,
                            _In_ LPSTR lpCmdLine,
                            _In_ int nShowCmd
                             );
        #else
            int WINAPI WinMain (
                         _In_ HINSTANCE hInstance,
                         _In_opt_ HINSTANCE hPrevInstance,
                         _In_ LPSTR lpCmdLine,
                         _In_ int nShowCmd
                          );
        #endif
    #endif

TouEnMasm


Very near,after a long search
Quote
#if !defined(_MAC)

   #if defined(_M_CEE_PURE)
      int   
      __clrcall
   WinMain (
            HINSTANCE hInstance,
                HINSTANCE hPrevInstance,
            LPSTR lpCmdLine,
            int nShowCmd
       );

   #else
   int
      WINAPI
   WinMain (
            HINSTANCE hInstance,
                HINSTANCE hPrevInstance,
            LPSTR lpCmdLine,
            int nShowCmd
       );

   
   #endif
#else
   int
   CALLBACK
WinMain (
         HINSTANCE hInstance,
             HINSTANCE hPrevInstance,
         LPSTR lpCmdLine,
         int nShowCmd
    );

#endif
Fa is a musical note to play with CL

dedndave

    #if defined(_MAC)
        #define BlahBlahBlah CALLBACK
    #else
        #if defined(_M_CEE_PURE)
            #define BlahBlahBlah __clrcall
        #else
            #define BlahBlahBlah WINAPI
        #endif
    #endif
    int BlahBlahBlah WinMain (
                       _In_ HINSTANCE hInstance,
                       _In_opt_ HINSTANCE hPrevInstance,
                       _In_ LPSTR lpCmdLine,
                       _In_ int nShowCmd
                        );


easier to read and understand - and BlahBlahBlah may be used later to reduce text   :P

dedndave

Taro - in the upper right corner of the forum page is a link to MASM32 Downloads
download and install the masm32 package
once installed, there are folders for help and examples