Click here to Skip to main content
15,923,164 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalusing namespace in a c++ dll Pin
MihaiChioariu7-Aug-05 9:33
MihaiChioariu7-Aug-05 9:33 
GeneralBoost + regex Pin
Jack Puppy7-Aug-05 7:47
Jack Puppy7-Aug-05 7:47 
GeneralSNMP: Urgent help needed Pin
Mukhan7-Aug-05 6:27
Mukhan7-Aug-05 6:27 
GeneralRegarding thumb recognition Pin
Pearlking7-Aug-05 4:40
Pearlking7-Aug-05 4:40 
GeneralRe: Regarding thumb recognition Pin
Maximilien7-Aug-05 5:16
Maximilien7-Aug-05 5:16 
General2 vc7 problems..and 1 question Pin
YaronNir7-Aug-05 4:38
YaronNir7-Aug-05 4:38 
GeneralRe: 2 vc7 problems..and 1 question Pin
toxcct7-Aug-05 8:43
toxcct7-Aug-05 8:43 
GeneralRe: 2 vc7 problems..and 1 question Pin
YaronNir7-Aug-05 20:08
YaronNir7-Aug-05 20:08 
Generaldbf odbc Pin
_tasleem7-Aug-05 3:23
_tasleem7-Aug-05 3:23 
GeneralRe: dbf odbc Pin
David Crow8-Aug-05 8:37
David Crow8-Aug-05 8:37 
GeneralRe: dbf odbc Pin
_tasleem10-Aug-05 12:28
_tasleem10-Aug-05 12:28 
GeneralWS_TABSTOP and EDIT controls Pin
Luther Baker7-Aug-05 0:04
Luther Baker7-Aug-05 0:04 
GeneralRe: WS_TABSTOP and EDIT controls Pin
Anonymous7-Aug-05 2:55
Anonymous7-Aug-05 2:55 
GeneralRe: WS_TABSTOP and EDIT controls Pin
Luther Baker7-Aug-05 7:36
Luther Baker7-Aug-05 7:36 
GeneralRe: WS_TABSTOP and EDIT controls Pin
benft12-Oct-05 14:06
benft12-Oct-05 14:06 
GeneralError during compiler upgrade Pin
AnkurGupta_19816-Aug-05 22:16
AnkurGupta_19816-Aug-05 22:16 
GeneralRe: Error during compiler upgrade Pin
toxcct6-Aug-05 22:59
toxcct6-Aug-05 22:59 
Generalcalling int 21h from a __asm block of code Pin
CorvetteZ06066-Aug-05 21:54
CorvetteZ06066-Aug-05 21:54 
GeneralRe: calling int 21h from a __asm block of code Pin
John R. Shaw6-Aug-05 23:28
John R. Shaw6-Aug-05 23:28 
GeneralRe: calling int 21h from a __asm block of code Pin
CorvetteZ06067-Aug-05 3:37
CorvetteZ06067-Aug-05 3:37 
GeneralRe: calling int 21h from a __asm block of code Pin
John R. Shaw8-Aug-05 18:39
John R. Shaw8-Aug-05 18:39 
I was thinking about a function call such as this (so I could call it):
return_type OpenFile(char* name)
{
__asm {
lea dx, name
mov ax, 3D02h
int 0021h
jc end
xchg ax, bx
...
}
...
}

Anyway, it does not matter.

I would go ahead and reinvent the wheel; actualy you are not reinventing the wheel, you are just bring it up to date. Things like accessing file I/0 should be handle at the current language level (things change). The only reason for keeping any of the code at assembly level is for speed.

Any of the assembly code you wish to keep and wrap in a function call should be wrapped in C function calls, so you do not have to deal with the difficulties (name mangaling) of C++.

Unless you are writting code at the driver level (ring 0), you normaly do not need to write assembly code. Modern day compilers are very good at otimising your code. Plus the fact that writting your code in C/C++ is much easier to understand (and modify).

Understand this: Under Win2000 and above the system will get upset if you try to access memory (read/write) without the proper security clearance, this is intended to defeat crackers/hackers.

__asm can be very useful, in time criticle applications. For good examples of its usage, see the source code for memset() and memcpy().

I know that I just told you to reinvent the wheel, but I realy beleive that is the best way to accomplish your goal (less headacks and, yes, less time in the long run).


INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
GeneralRe: calling int 21h from a __asm block of code Pin
Alexander M.,7-Aug-05 4:38
Alexander M.,7-Aug-05 4:38 
GeneralRe: calling int 21h from a __asm block of code Pin
Gary R. Wheeler7-Aug-05 4:52
Gary R. Wheeler7-Aug-05 4:52 
GeneralRe: calling int 21h from a __asm block of code Pin
CorvetteZ06067-Aug-05 6:08
CorvetteZ06067-Aug-05 6:08 
GeneralRe: calling int 21h from a __asm block of code Pin
David Crow8-Aug-05 8:42
David Crow8-Aug-05 8:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.