Daftest "Plz send teh codes" yet...



  • [quote user="http://www.codeguru.com/forum/showthread.php?t=309043"]

    			September 8th, 2004, 08:43 PM
    		
    		
    		<!-- / status icon and date -->
    	</div>
    </td>
    
    <!-- user info -->
    		<td nowrap="nowrap">
    
    			<div id="postmenu_1011066">
    				
    				<a href="http://www.codeguru.com/forum/member.php?s=ef0d2a8eb44af7aa8476d36411636733&amp;u=135515" class="bigusername">kathir4</a>
    				<img src="http://www.codeguru.com/forum/images/statusicon/user_offline.gif" class="inlineimg" alt="kathir4 is offline" border="0">
    
    
    				<script type="text/javascript"> vbmenu_register("postmenu_1011066", true); </script>
    				
    			</div>
    
    			<div class="smallfont">Junior Member</div>
    			
    			
    
    		</td>
    		<td width="100%">&nbsp;</td>
    		<td nowrap="nowrap" valign="top">
    
    			<div class="smallfont">
    				<div>Join Date: Sep 2004</div>
    				
    				
    				<div>
    					Posts: 5
    				</div>
    				
    				
    				<div><span id="repdisplay_1011066_135515"><img src="http://www.codeguru.com/forum/images/reputation/reputation_pos.gif" class="inlineimg" alt="kathir4 is an unknown quantity at this point (&lt;10)" border="0"></span></div>
    				
    				<div>    </div>
    			</div>
    
    		</td>
    	</tr>
    	</tbody></table>
    	<!-- / user info -->
    </td>
    
    <td class="alt1" id="td_post_1011066">
    	
    <!-- message, attachments, sig -->
    
    	
    
    	
    		<!-- icon and title -->
    		<div class="smallfont">
    			
    			<b>Re: int WINAPI WinMain(...) ~ hey guys, can tell me what does the WINAPI mean?</b>
    		</div>
    		<hr style="color: rgb(209, 209, 225); background-color: rgb(209, 209, 225);" size="1">
    		<!-- / icon and title -->
    	
    
    	<!-- message -->
    	<div id="post_message_1011066">
    		
    		<div style="margin: 5px 20px 20px;">
    <div class="smallfont" style="margin-bottom: 2px;">Quote:</div>
    <table border="0" cellpadding="3" cellspacing="0" width="100%">
    <tbody><tr>
    	<td class="alt2" style="border: 1px inset ;">
    		
    			<div>
    				Originally Posted by <b>overtime_e</b>
    				
    			</div>
    			<div style="font-style: italic;">Hello!<br>
    

    i m a student doing my Final Year Project. i m given a software task using Visual C++ to make an application running a Bluetooth device. Though i m familiar with C and C++, i m very new to Visual C++..

    i m given thousands of lines of code to look at now.. though i can recognise the language, there are many things that are unfamiliar to me

    int WINAPI WinMain(...) { ... }

    Can anybody tell me what is WINAPI? Why is it declared after the type and before the function name?

    i have checked up Microsoft MSDN site and searched the forum here but to no positive results..

    hope brothers here can help me~ thanks!!
    	</td>
    </tr>
    </tbody></table>
    



    DEar friend

    Pl send the full code so that i can give explanation for these

    M.Kathiresan
    Sub Divisional Engineer Telecom
    BSNL
    INDIA
    kathiresan_muthiah2001@yahoo.com
     
    [/quote]
    LOLWUT? You need to see the guys code in order to explain the windows calling convention?


  • In Order to post a comment can i see your codez?



  • @DaveK said:

    i have checked up Microsoft MSDN site and searched the forum here but to no positive results..

    Flail! The MSDN Library index has two entries on "WINAPI" and both explain what it is.



  • @Spectre said:

    @overtime_e said:
    i have checked up Microsoft MSDN site and searched the forum here but to no positive results..

    Flail! The MSDN Library index has two entries on "WINAPI" and both explain what it is.

    You, sir, flail at attributing your quotes!  FTFY.



  • @fusspawn said:

    In Order to post a comment can i see your codez?
    I just realised that "can i see your codez?" must be some kind of pickup line...



  • @Eternal Density said:

    @fusspawn said:

    In Order to post a comment can i see your codez?
    I just realised that "can i see your codez?" must be some kind of pickup line...

     

    Is that a stack overflow or are you just happy to see me?



  • BSNL - bah I found it odd to find my initials in the signature of that comment.  But ya if I asked a question about calling conventions I'd be pretty surprised to find someone asking for the full source code.

    @Someone You Know said:

    Is that a stack overflow or are you just happy to see me?
      They say I've got a real Hard Drive baby...



  • don't you love those Indian 'programmers'?

    One claims to need 'zu koduz' for his 'final year project', another (claiming to be a professional) asks that 'student' for 'yur koduz' so he can 'help'...

    Is it some new courtship ritual over there to try to cheat on an assignment?



  • Incomprehensible. Why all those indians just want code, with no f*cking clue? They pile up lines and lines in the disk that they don't understand, just to feel good that "i have teh codes from teh internets in my hurt disc"?

    Reminds me the best "send teh codes" line I've ever, [i]ever[/i] seen:



  • @Spectre said:

    Flail! The MSDN Library index has two entries on "WINAPI" and both explain what it is.

    I tried searching the MSDN site but it's fubar on Camino.   Could you spare me the suspense and actually answer the poor guy's question?  Is the syntax actually "int WINAPI WinMain(...)" or did the forum software munch a "::" in "WINAPI::WinMain" ?  I'd be confused too if I saw an extra token between the return type and the function name.  And simply telling me that an answer exists wouldn't be very helpful.



  • @AlpineR said:

    Could you spare me the suspense and actually answer the poor guy's question?
    int WINAPI WinMain(      
        HINSTANCE hInstance,
        HINSTANCE hPrevInstance,
        LPSTR lpCmdLine,
        int nCmdShow
    );

    Sauce: WinMain Function ()

    And to answer his question, rather than yours,

    #define WINAPI __stdcall 

    Sauce: __stdcall (C++)

    And _stdcall means:

    • All arguments are passed through the stack, "from right to left".
    • Arguments are passed by value unless otherwise specified.
    • The callee cleans the stack.
    • Naming convention is "" + function name + "@" + sum of arguments' size in bytes

    Other options are __cdecl, __fastcall, __pascal, __fortran, and __syscall.



  • @AlpineR said:

    @Spectre said:

    Flail! The MSDN Library index has two entries on "WINAPI" and both explain what it is.

    I tried searching the MSDN site but it's fubar on Camino.   Could you spare me the suspense and actually answer the poor guy's question?  Is the syntax actually "int WINAPI WinMain(...)" or did the forum software munch a "::" in "WINAPI::WinMain" ?  I'd be confused too if I saw an extra token between the return type and the function name.  And simply telling me that an answer exists wouldn't be very helpful.

    The first.  WINAPI is a macro #define that expands to "_stdcall".




  • @TwelveBaud said:

    @AlpineR said:
    Could you spare me the suspense and actually answer the poor guy's question?

    int WINAPI WinMain(      
        HINSTANCE hInstance,
        HINSTANCE hPrevInstance,
        LPSTR lpCmdLine,
        int nCmdShow
    );

    Sauce: WinMain Function ()

    And to answer his question, rather than yours,

    #define WINAPI __stdcall 

    Sauce: __stdcall (C++)

    And _stdcall means:

    • All arguments are passed through the stack, "from right to left".
    • Arguments are passed by value unless otherwise specified.
    • The callee cleans the stack.
    • Naming convention is "" + function name + "@" + sum of arguments' size in bytes

    Other options are __cdecl, __fastcall, __pascal, __fortran, and __syscall.

    Don't forget the lesser-known __cheese, __spigot, __ohlookanelephant and __wtf!



  • @AlpineR said:

    @Spectre said:

    Flail! The MSDN Library index has two entries on "WINAPI" and both explain what it is.

    I tried searching the MSDN site but it's fubar on Camino.   Could you spare me the suspense and actually answer the poor guy's question?  Is the syntax actually "int WINAPI WinMain(...)" or did the forum software munch a "::" in "WINAPI::WinMain" ?  I'd be confused too if I saw an extra token between the return type and the function name.  And simply telling me that an answer exists wouldn't be very helpful.

    http://www.google.com/search?hl=en&q=WINAPI+macro+site%3Amsdn.microsoft.com&btnG=Search



  • Heh.  I saw what you did there.  Your first answer probably "wouldn't be very helpful" if you hadn't extended it like that!



  • @galgorah said:

    @Someone You Know said:

    Is that a stack overflow or are you just happy to see me?
      They say I've got a real Hard Drive baby...

    For fifty bucks I'll catch all your exceptions.



  • @Someone You Know said:

    @galgorah said:

    @Someone You Know said:

    Is that a stack overflow or are you just happy to see me?
      They say I've got a real Hard Drive baby...

    For fifty bucks I'll catch all your exceptions.

    Do you consume them or re-throw them?



  • @DaveK said:

    @Someone You Know said:

    @galgorah said:

    @Someone You Know said:

    Is that a stack overflow or are you just happy to see me?
      They say I've got a real Hard Drive baby...

    For fifty bucks I'll catch all your exceptions.

    Do you consume them or re-throw them?
    I would suspect both. but at the very least only consumption will suffice.


  • @DaveK said:

    @Someone You Know said:

    @galgorah said:

    @Someone You Know said:

    Is that a stack overflow or are you just happy to see me?
      They say I've got a real Hard Drive baby...

    For fifty bucks I'll catch all your exceptions.

    Do you consume them or re-throw them?
     

    Depends on how many private members are involved.



  • @Someone You Know said:

    @DaveK said:

    @Someone You Know said:

    @galgorah said:

    @Someone You Know said:

    Is that a stack overflow or are you just happy to see me?
      They say I've got a real Hard Drive baby...

    For fifty bucks I'll catch all your exceptions.

    Do you consume them or re-throw them?
     

    Depends on how many private members are involved.


    Oh, go fork yourself...




  •  "OMG I got this project I got to do for tomorow about your naked self, plz send me teh codez!"

    and your friend yells

     "Yo send me teh codez too!"

    then you say

     "Don't listen to him, he'll just get you spammed"




  • @TwelveBaud said:

    @AlpineR said:
    Could you spare me the suspense and actually answer the poor guy's question?

    int WINAPI WinMain(      
        HINSTANCE hInstance,
        HINSTANCE hPrevInstance,
        LPSTR lpCmdLine,
        int nCmdShow
    );

    Sauce: WinMain Function ()

    And to answer his question, rather than yours,

    #define WINAPI __stdcall 

    Sauce: __stdcall (C++)

    ...

    options are __cdecl, __fastcall, __pascal, __fortran, and __syscall.

     

     

    What's with the "Sauce"?

    I don't what that word means in this context.

    As well, it makes the original problem more confusing.

    (For those wishing to insult me rather than answer my question : Yes. i'm a bad programmer and i haven't been programming since i was 2 and i have a small penis)



  • @Stupidumb said:

    @TwelveBaud said:

    Sauce: WinMain Function ()

     

     

    What's with the "Sauce"?

    I don't what that word means in this context.

    As well, it makes the original problem more confusing.

      It's just a play on words (aka pun): "sauce" = "source". 

    @Stupidumb said:

    (For those wishing to insult me rather than answer my question : Yes. i'm a bad programmer and i haven't been programming since i was 2 and i have a small penis)

    Interesting technique you have there, but it's more like suicide than inb4.  All I have to do now is not insult you in order to make you look really foolish.  Errr... that means it would be a kindness of me to flame you into the middle of next week?  Oh, alright then.

    @me said:

     

    You're fairly nice and occasionally smell of roses.

     

    Damn!  I failed! 


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.