Advertisement

e-mailing .exe program as attachment

Started by February 28, 2002 01:22 AM
7 comments, last by byrd 22 years, 6 months ago
I''ve been playing around with NeHe''s opengl tutorials and I was wondering howto send the Lesson.exe file as an attachment. I sent it to myself and then downloaded it to my desktop and ran it. Then got the error Initialization Failed. I used the search engine but couldn''t find what I was looking for, I''m sure its in here somewhere but I dont have the skills to find it I''m trying to figure this out on my own but in the meantime any help would be nice.
Oh and by the way its lesson6 where NeHe shows ya howto put a texture on a 3d quad and rotate it, The error is when it tries to initialize the window after it created it(I think).
Advertisement
well uh nevermind I think I figured it out. All I had to do was send the texture .bmp file with the .exe and put it in the same folder together so It could load the texture data. I figured that would be contained in the .exe but I guess not. If i''m wrong and it works now for some other reason please tell me.
Okay here I am again. I wondering if there''s a way to include the texture file into the .exe instead of sending them separately. I know there''s a way I just dont know howto do it. heh
quote: Original post by byrd
Okay here I am again. I wondering if there''s a way to include the texture file into the .exe instead of sending them separately. I know there''s a way I just dont know howto do it. heh


Hmm... I think that you could add them to a single .zip file.
you could put insert the texture as an byte array. Just fire up notepad, load the texture into it and copy it..

then, some where in a .h or .cpp file, where you need the variable, just do following:

char imagedata[] = "paste the texture stuff in here..";

I''ve never tried it, but it should work! :o)

ok,
hope that helped,
cya,
Phil


Visit Rarebyte!
and no!, there are NO kangaroos in Austria (I got this questions a few times over in the states )
Visit Rarebyte! and no!, there are NO kangaroos in Austria (I got this question a few times over in the states ;) )
Advertisement
You should always send exe files in a .zip file, using WinZIP or equivalent. For one thing, it can dramatically reduce the size of the file, which is nice for the recipient.

Second, many people do NOT trust executable attachments. I will delete them immediately unless I asked the person to send that file to me. There''s way too many viruses around sending executables to everyone in an address book to trust that your friend really did send the file.

Finally, in your case, you could add additional files, such as the textures, source code, readmes, etc.
Thx for the help guys. I zipped the file and it works fine, dunno why I didnt think of that earlier. But I tried to load the bmp file into notepad and not sure exactly howto convert an imagine into a text file. I added a resource bitmap file to my project but it only lets me save it as a 16,256 or monochrome bitmap so the picture looks really bad after it converts it from 24bit.
you never load a binary file in notepad and expect to copy that into a header file and expect it to work. thats just plain silly.

This topic is closed to new replies.

Advertisement