tags:

views:

129

answers:

8

I'm going to create a utility with GUI that will run on Windows operating systems.

It should require minimum (or zero!) amount of additional libraries, files or DLLs to run because it will be executed from an installer. Because of this, i don't want to use .NET for it will require user to install .NET Framework. I know today, most of Windows installed system come with .NET Framework but in my case i cannot be sure.

The utility will...

  • send some data to a web site and parse the returning data,
  • collect some hardware info, like MAC address, CPU type and make, hard-disk serial number

I suppose native Win32 API could be used for all of those above, but instead of hassling with Win32, i'd prefer using a more developer friendly API, or SDK.

Thanks in advance.

A: 

For the GUI you can either build your application with MFC (statically linked) or use a HTML based dialog that you can interact with using COM. (It is even possible to interact with javascript present in the page displayed by the dialog).

villintehaspam
+3  A: 

If what you want is minimum dependency with external files or DLLs you could statically compile all the required DLLs with the tool exe. Then you could use something like Visual C++ to develop such tool.

Cesar
+6  A: 

Win32 API is the only way, and of course there are standard API - for sending data over the internet, you could use WinInet.lib/dll, to obtain information about the MAC, you could use the GetAdaptersInfo by using Iphlpapi.lib/dll,(here's a link on how to use it) for the Hard disk serial number you could use GetVolumeInformation by using kernel32.lib/dll. For the CPU Id, you might look into GetSystemInfomation

Edit: There's a C++ code, but you can easily derive a wrapper from this site Unfortunately, with WinAPI is not easy, no such thing as RAD with WinAPI but what you gain out of it is lightweight code instead of relying on SDK's, frameworks and dragging buggy dll's around with your application.

Hope this helps, Best regards, Tom.

tommieb75
+1 Agree, Win32 API is the most lightweight solution. It isn't recommended by MS, but if you're prepared to accept you might be compiling in (statically) a buggy MS VC library, use -MT rather than the default -MD flag.
Ninefingers
My only concern of Win32 API is that i couldn't develop my tool rapidly because i would need to code some base code for network operations. Any suggestions for a good wrapper?
frbry
@frbry: There's a C++ code, but you can easily derive a wrapper from this http://www.codeguru.com/cpp/i-n/internet/generalinternet/article.php/c3411/ Unfortunately, with WinAPI is not easy, no such thing as RAD with WinAPI but what you gain out of it is lightweight code instead of relying on SDK's, frameworks....
tommieb75
A: 

For the specific requirement that you do have, I feel Win32 API is the only way out.

Kangkan
+4  A: 

You can statically link most C++ GUI libraries - even MFC. Personally, I recommend WTL, wihich is very light and header-only.

Nemanja Trifunovic
Seconded! WTL is much easier to get going with than raw Win32 (though it helps to know a little Win32 to fill in the gaps).
undees
A: 

Use MFC and statically link to it. No runtime dependancies need to be installed.

John Dibling
+2  A: 

WTL is perfect for this sort of application and I am surprised more people aren't recommending it. You can also statically link with the CRT and hey presto - no dependencies and a very small EXE.

Rob
+1  A: 

Delphi (now by Embarcadero) would do the job, creating a .exe file with no dependencies, and it is much easier to work with than the raw Win32 API.

If you don't like Object Pascal, you could try C++ Builder instead.

Frederik Slijkerman
Thanks but i guess i'll stick with C++ :)
frbry