Neuigkeiten:

still alive...

Hauptmenü

Hello World

Begonnen von gerde, 30. Oktober 2002, 15:18:48

Vorheriges Thema - Nächstes Thema

gerde

Ich weiß ned ob ihr\\\'s schon kennt, ich find\\\'s ziemlich geil, und ziemlich realistisch.
 
High School/Junior High
 
10 PRINT \\\"HELLO WORLD\\\"
20 END
 
First Year in College
 
program Hello(input, output)
begin
writeln(\\\'Hello World\\\')
end.
 
Senior Year in College
(defun hello
(print
(cons \\\'Hello (list \\\'World))))
 
New Professional
 
#include
void main(void)
{
char *message[] = {\\\"Hello \\\", \\\"World\\\"};
int i;
for(i = 0; i Release();
// Tell OLE we are going away.
CoUninitialize();
return(0);
}
extern CLSID CLSID_CHello;
extern UUID LIBID_CHelloLib;
CLSID CLSID_CHello = { /* 2573F891-CFEE-101A-9A9F-00AA00342820 */
0x2573F891,
0xCFEE,
0x101A,
{ 0x9A, 0x9F, 0x00, 0xAA, 0x00, 0x34, 0x28, 0x20 }
};
UUID LIBID_CHelloLib = { /* 2573F890-CFEE-101A-9A9F-00AA00342820 */
0x2573F890,
0xCFEE,
0x101A,
{ 0x9A, 0x9F, 0x00, 0xAA, 0x00, 0x34, 0x28, 0x20 }
};
#include
#include
#include
#include
#include
#include \\\"pshlo.h\\\"
#include \\\"shlo.hxx\\\"
#include \\\"clsid.h\\\"
int _cdecl main(
int argc,
char * argv[]
) {
HRESULT hRslt;
IHello *pHello;
ULONG ulCnt;
IMoniker * pmk;
WCHAR wcsT[_MAX_PATH];
WCHAR wcsPath[2 * _MAX_PATH];
// Get object path.
wcsPath[0] = \\\'\\\\0\\\';
wcsT[0] = \\\'\\\\0\\\';
if( argc > 1) {
mbstowcs(wcsPath, argv[1], strlen(argv[1]) + 1);
wcsupr(wcsPath);
}
else {
fprintf(stderr, \\\"Object path must be specified\\\\n\\\");
return(1);
}
// Get print string.
if(argc > 2)
mbstowcs(wcsT, argv[2], strlen(argv[2]) + 1);
else
wcscpy(wcsT, L\\\"Hello World\\\");
printf(\\\"Linking to object %ws\\\\n\\\", wcsPath);
printf(\\\"Text String %ws\\\\n\\\", wcsT);
// Initialize the OLE libraries.
hRslt = CoInitializeEx(NULL, COINIT_MULTITHREADED);
if(SUCCEEDED(hRslt)) {
hRslt = CreateFileMoniker(wcsPath, &pmk);
if(SUCCEEDED(hRslt))
hRslt = BindMoniker(pmk, 0, IID_IHello, (void **)&pHello);
if(SUCCEEDED(hRslt)) {
// Print a string out.
pHello->PrintSz(wcsT);
Sleep(2000);
ulCnt = pHello->Release();
}
else
printf(\\\"Failure to connect, status: %lx\\\", hRslt);
// Tell OLE we are going away.
CoUninitialize();
}
return(0);
}

Es gibt nur einen Gott: belafarinrod! http://www.quakefans.de/images/smilies/ugly.gif\" alt=\"ugly.gif\">


-vortex-

lol, wie geil /uploads/emoticons/icon_e_wink.gif.3167d127940f44558fbf1ccd9b6d60a9.gif\" alt=\";-)\" />
New Professional
#include
void main(void)
{
char *message[] = {\\\"Hello \\\", \\\"World\\\"};
int i;
for(i = 0; i < 2; ++i)
printf(\\\"%s\\\", message);
printf(\\\"\\\\n\\\");
}
[/quote]
bis dahin versteh ich es noch:D
  - Editiert von Vortex am 30.10.2002, 15:37 -



¥€$ - I LOVE MONEY










mendieta

/uploads/emoticons/icon_e_surprised.gif.a8707b3f35a569cb4cfe563fc72ef78d.gif\" alt=\":-o\" />

------------------------------------------------


Fussball Bundesliga Tippliga


http://www.soccertip.de\" rel=\"external nofollow\">http://www.soccertip.de


webmaster@soccertip.de


-----------------------------------------------


gerde

Dann musst noch was lernen, um ein Seasoned Professional zu werden /uploads/emoticons/icon_e_wink.gif.3167d127940f44558fbf1ccd9b6d60a9.gif\" alt=\";-)\" />

Es gibt nur einen Gott: belafarinrod! http://www.quakefans.de/images/smilies/ugly.gif\" alt=\"ugly.gif\">


all your base are belong to us