Re: How to Get MachineName at Compile Time?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Thanks, I know how to do some of what you write, except:

#2. How do I " Set the file to compile as an embedded resource?"

#3. How do I "Read the contents of the file out of the manifest
resources?"

#4. I now have a pre-build step that says "hostname > MachineName.txt"
but it puts the answer in {project}/bin/Debug directory. Should I
have the pre-build step say "hostname > ..\..\MachineName.txt"? or
some other location. I guess question #4 is related to #3.

Thanks

.



Relevant Pages

  • Re: using PlaySound within a dll
    ... > I have a dll with a module, class and resource file. ... PlaySound has the capability to play a .wav file directly from the ... Compile your DLL. ...
    (microsoft.public.vb.winapi)
  • Re: Precompiled headers on C
    ... see how using C++ for the part of my program that manages the resource data ... No offence, but I really wish people would ask the question that has been ... header error when I try to compile it now. ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Precompiled headers on C
    ... see how using C++ for the part of my program that manages the resource data ... No offence, but I really wish people would ask the question that has been ... header error when I try to compile it now. ...
    (microsoft.public.vc.language)
  • Re: is there a way to set the version information from the program
    ... swezeyt wrote: ... Since I have to set these #defines when I compile the program anyway ... Currently for each version I have to go in and manually change it in the resource Script by hand using the resource editor. ... I usually create a version.h header file in which I tags to represent all version-related information, such as the release version in both a string and any numeric formats required. ...
    (microsoft.public.vc.language)
  • Re: compile hta file
    ... If you google up HTA ... into a "resource" block, and then compiling that into an exe or dll. ... executables which contains stuff like text resources (which can be ... testing this article but can't get it to compile an ".hta" file. ...
    (microsoft.public.scripting.vbscript)