Click here to Skip to main content
15,888,527 members
Home / Discussions / C#
   

C#

 
GeneralRe: unregister remoting type Pin
Guillermo Rivero13-Oct-03 6:04
Guillermo Rivero13-Oct-03 6:04 
QuestionWhich mail server support IMAP? Pin
trungbkvn10-Oct-03 19:04
trungbkvn10-Oct-03 19:04 
AnswerRe: Which mail server support IMAP? Pin
Blake Coverett10-Oct-03 21:08
Blake Coverett10-Oct-03 21:08 
GeneralColor and height of toolbar wrong Pin
Joe Woodbury10-Oct-03 10:49
professionalJoe Woodbury10-Oct-03 10:49 
GeneralLOWORD and HIBYTE Pin
Andrew day10-Oct-03 8:50
Andrew day10-Oct-03 8:50 
GeneralRe: LOWORD and HIBYTE Pin
J. Dunlap10-Oct-03 9:07
J. Dunlap10-Oct-03 9:07 
GeneralRe: LOWORD and HIBYTE Pin
Blake Coverett10-Oct-03 9:11
Blake Coverett10-Oct-03 9:11 
GeneralRe: LOWORD and HIBYTE Pin
Blake Coverett10-Oct-03 9:10
Blake Coverett10-Oct-03 9:10 
While those macros themselves won't work due to C# not having a macro preprocessor (a good thing) the same expressions used in defining them will work fine. You can express them as methods, which will certainly be inlined by the JIT.

From windef.h:
#define LOWORD(l)           ((WORD)((DWORD_PTR)(l) & 0xffff))
#define HIWORD(l)           ((WORD)((DWORD_PTR)(l) >> 16))
#define LOBYTE(w)           ((BYTE)((DWORD_PTR)(w) & 0xff))
#define HIBYTE(w)           ((BYTE)((DWORD_PTR)(w) >> 8))
So in C#:
public static ushort LowWord(uint value) {
    return (ushort)(value & 0xFFFF);
}
public static ushort HighWord(uint value) {
    return (ushort)(value >> 16);
}
public static byte LowByte(ushort value) {
    return (byte)(value & 0xFF);
}
public static byte HighByte(ushort value) {
    return (byte)(value >> 8);
}


--
-Blake (com/bcdev/blake)
GeneralRe: LOWORD and HIBYTE Pin
Andrew day14-Oct-03 4:31
Andrew day14-Oct-03 4:31 
GeneralReading Remote Registry using C# Pin
winterminute10-Oct-03 5:49
winterminute10-Oct-03 5:49 
GeneralPost processing paint on user controls Pin
Tomaž Štih10-Oct-03 5:01
Tomaž Štih10-Oct-03 5:01 
GeneralEnums - Creating at runtime Pin
Andrew day10-Oct-03 2:46
Andrew day10-Oct-03 2:46 
GeneralRe: Enums - Creating at runtime Pin
James Simpson10-Oct-03 6:21
James Simpson10-Oct-03 6:21 
GeneralRe: Enums - Creating at runtime Pin
Andrew day10-Oct-03 8:48
Andrew day10-Oct-03 8:48 
QuestionC# with Access DAtabases? Pin
Azel Low10-Oct-03 1:18
Azel Low10-Oct-03 1:18 
AnswerRe: C# with Access DAtabases? Pin
Mike Dimmick10-Oct-03 2:31
Mike Dimmick10-Oct-03 2:31 
GeneralWindows Hooks Pin
vikramlinux10-Oct-03 0:15
vikramlinux10-Oct-03 0:15 
GeneralRe: Windows Hooks Pin
Nick Parker10-Oct-03 2:22
protectorNick Parker10-Oct-03 2:22 
QuestionControlPaint class and Windows XP Themes? Pin
Chris Richner9-Oct-03 23:24
Chris Richner9-Oct-03 23:24 
AnswerRe: ControlPaint class and Windows XP Themes? Pin
J. Dunlap10-Oct-03 9:12
J. Dunlap10-Oct-03 9:12 
AnswerRe: ControlPaint class and Windows XP Themes? Pin
Joe Woodbury13-Oct-03 12:45
professionalJoe Woodbury13-Oct-03 12:45 
GeneralRe: ControlPaint class and Windows XP Themes? Pin
Chris Richner14-Oct-03 10:45
Chris Richner14-Oct-03 10:45 
GeneralMinimize to system tray Pin
devvvy9-Oct-03 22:05
devvvy9-Oct-03 22:05 
GeneralRe: Minimize to system tray Pin
Anonymous9-Oct-03 23:09
Anonymous9-Oct-03 23:09 
GeneralRe: Minimize to system tray Pin
devvvy10-Oct-03 7:24
devvvy10-Oct-03 7:24 

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.