Forum
Downloads
News
Introduction
Quick Start
Link To Us
Revenue
ProTools
Sponsors
Statistics
9507
Posts
:
1440 Topics
8067 Replies
3
Images
:
Inside the Screenshots
111
Files
:
Inside the Downloads Area
4801
Reg. Members
:
Last:
Triangel
Browsed Pages
:
Last posts
The Assembler IDE, WinAsm Studio V5.1.5.0
by:
Triangel
on: 14.11.2007 19:31
Syntax Highlighting and more...
by:
richm
on: 14.11.2007 10:49
Declaring and calling exported functions for DLL's
by:
Swagler
on: 13.11.2007 18:22
Happy birthday SeaFarer
by:
modchip
on: 13.11.2007 02:14
Happy birthday SeaFarer
by:
SeaFarer
on: 13.11.2007 01:01
Happy birthday SeaFarer
by:
Lahar
on: 12.11.2007 19:10
Happy birthday SeaFarer
by:
akyprian
on: 12.11.2007 15:25
Declaring and calling exported functions for DLL's
by:
samael
on: 12.11.2007 15:16
Declaring and calling exported functions for DLL's
by:
Swagler
on: 12.11.2007 14:38
Happy birthday SeaFarer
by:
Swagler
on: 12.11.2007 14:15
Happy birthday SeaFarer
by:
shoorick
on: 12.11.2007 08:01
Forum
Welcome Guest (
Log In
|
Register
)
Resend Validation Email
Search
Users
Calendar
Board Help
Home
->
WinAsm Forum
->
Computer Science
->
C/C++
Produce an extremely small executable, sized 1 KB, With VC++ 2005 Express Edition
Track this topic
|
Email this topic
|
Print this topic
Vortex
Posted:
Nov 6 2006, 10:49 AM
Very Active Member
Group: Moderators
Posts: 76
Member No.: 8
Joined: 13-May 04
Here is a small VC++ executable coded with VC++ 2005 Express Edition. The size of the final executable displaying a simple dialog box is only 1 KB.
CODE
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
extern char Dlgbox[];
BOOL CALLBACK DlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch(msg)
{
case WM_CLOSE:
EndDialog(hwnd,0);
break;
default:
return FALSE;
}
return TRUE;
}
int start()
{
return(DialogBoxIndirectParam(GetModuleHandle(0),(LPCDLGTEMPLATE)Dlgbox,0,DlgProc,0));
}
CODE
cl /c /Oty2 /Zl /Gs /GS- /FoSmallDlg.OBJ SmallDlg.c
link /SUBSYSTEM:WINDOWS /NODEFAULTLIB /ENTRY:start /MERGE:.rdata=.data /MERGE:.data=.text SmallDlg.obj Rsrc.obj kernel32.lib user32.lib
Attached File ( Number of downloads: 30 )
SmallDlg.zip
Vortex
Posted:
Aug 30 2007, 05:16 AM
Very Active Member
Group: Moderators
Posts: 76
Member No.: 8
Joined: 13-May 04
Here is an example of building a small C executable with Vista SDK. Depending on your Vista SDK installation, you need to modify Variables.cmd and SetVars.bat to reflect the correct paths.
Attached File ( Number of downloads: 11 )
VistaSDKdemo.zip
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
«
Next Oldest
|
C/C++
|
Next Newest
»
Close Topic Options
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
Forum Home
Search
Help
Announcements & Forum Rules
- Announcements, Forum Rules & Guidelines
WinAsm Studio
- General Discussions
- Suggestions/Bug Reports
- WinAsm Studio FAQ
- Multilingual User Interface
- Add-Ins
HiEditor
- General Discussions
- Suggestions/Bug Reports
Assembly Programming
- Main
- Newbies
- Projects
- Custom Controls
- Snippets
Computer Science
- Internet
- C/C++
General
- Russian
- The Heap