NetMessageBufferSend will net



  • Hi,

    ich möchte gerne eine MSG an einen Freund senden per Internet, doch das will nicht...

    #include <windows.h>
    #include <Lm.h>
    #   pragma comment(lib, "Netapi32.lib")
    
    int __stdcall WinMain(HINSTANCE__ *Instance, HINSTANCE__ *prevInstance, char *cmdLine, int cmdShow) 
    {
    	NetMessageBufferSend(NULL, L"xxx.xxx.xxx.xxx", L"Hallo", (LPBYTE) L"HUHU DU DA", strlen("HUHU DU DA")*2);
    	return 0;
    }
    

    Was stimmt da nicht? Er bekommt einfach keine Nachricht.... Nachrichten dienst ist an bei uns beiden.

    Was muss ich alles machen damit das richtig per Internet funzt?



  • *push*



  • bitte, kennt keiner eine antwort? ich finde bei google nix zu meinem problem 😞



  • Die Funktion sagt Dir eigentlich recht genau, was nicht paßt...

    Was liefert sie Dir denn zurück?

    Ansonsten: http://www.c-plusplus.net/forum/topic,15924.html

    Zitat aus der MSDN:

    MSDN schrieb:

    If the function fails, the return value can be one of the following error codes.

    Return code Description
    ERROR_ACCESS_DENIED The user does not have access to the requested information.
    ERROR_INVALID_PARAMETER The specified parameter is invalid.
    ERROR_NOT_SUPPORTED This network request is not supported.
    NERR_NameNotFound The user name could not be found.
    NERR_NetworkError A general failure occurred in the network hardware.


Anmelden zum Antworten