Click here to Skip to main content
15,925,400 members
Home / Discussions / C#
   

C#

 
GeneralRe: Removing Windows Services and event log Pin
devvvy11-Oct-03 7:31
devvvy11-Oct-03 7:31 
GeneralRe: Removing Windows Services and event log Pin
devvvy11-Oct-03 7:31
devvvy11-Oct-03 7:31 
GeneralRe: Removing Windows Services and event log Pin
Daniel M. Edwards11-Oct-03 7:38
Daniel M. Edwards11-Oct-03 7:38 
GeneralRe: Removing Windows Services and event log Pin
devvvy11-Oct-03 7:51
devvvy11-Oct-03 7:51 
GeneralRe: Removing Windows Services and event log Pin
Daniel M. Edwards11-Oct-03 9:24
Daniel M. Edwards11-Oct-03 9:24 
GeneralDisable scrollbars Pin
Gary Kirkham11-Oct-03 3:47
Gary Kirkham11-Oct-03 3:47 
GeneralRe: Disable scrollbars Pin
phimix17-Jan-04 2:30
phimix17-Jan-04 2:30 
GeneralRe: Disable scrollbars Pin
Gary Kirkham20-Jan-04 3:53
Gary Kirkham20-Jan-04 3:53 
GeneralListview Custum Collection Databinding Pin
Anonymous11-Oct-03 3:07
Anonymous11-Oct-03 3:07 
GeneralMoving scroll bars Pin
plextoR11-Oct-03 0:41
plextoR11-Oct-03 0:41 
GeneralRe: Moving scroll bars Pin
Jim Stewart11-Oct-03 13:19
Jim Stewart11-Oct-03 13:19 
Generalunregister remoting type Pin
devvvy11-Oct-03 0:13
devvvy11-Oct-03 0:13 
GeneralRe: unregister remoting type Pin
Guillermo Rivero13-Oct-03 3:18
Guillermo Rivero13-Oct-03 3:18 
GeneralRe: unregister remoting type Pin
Norman Fung13-Oct-03 3:44
Norman Fung13-Oct-03 3:44 
GeneralRe: unregister remoting type Pin
Guillermo Rivero13-Oct-03 4:14
Guillermo Rivero13-Oct-03 4:14 
GeneralRe: unregister remoting type Pin
Norman Fung13-Oct-03 5:58
Norman Fung13-Oct-03 5:58 
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 

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.