Click here to Skip to main content
15,921,463 members
Home / Discussions / C#
   

C#

 
QuestionAnyone that has used SQLExpress as their db? Pin
Glen Harvy19-Mar-07 16:57
Glen Harvy19-Mar-07 16:57 
AnswerRe: Anyone that has used SQLExpress as their db? Pin
Russell Jones19-Mar-07 22:27
Russell Jones19-Mar-07 22:27 
GeneralRe: Anyone that has used SQLExpress as their db? [modified] Pin
Glen Harvy19-Mar-07 23:25
Glen Harvy19-Mar-07 23:25 
JokeRe: Anyone that has used SQLExpress as their db? Pin
joon vh.20-Mar-07 0:47
joon vh.20-Mar-07 0:47 
GeneralRe: Anyone that has used SQLExpress as their db? Pin
Glen Harvy20-Mar-07 1:38
Glen Harvy20-Mar-07 1:38 
GeneralRe: Anyone that has used SQLExpress as their db? Pin
Russell Jones20-Mar-07 1:02
Russell Jones20-Mar-07 1:02 
GeneralRe: Anyone that has used SQLExpress as their db? Pin
Glen Harvy20-Mar-07 1:48
Glen Harvy20-Mar-07 1:48 
AnswerRe: Anyone that has used SQLExpress as their db? Pin
Glen Harvy22-Mar-07 22:26
Glen Harvy22-Mar-07 22:26 
QuestionHow to get data from PHP into C# Windows Application? [modified] Pin
Khoramdin19-Mar-07 15:57
Khoramdin19-Mar-07 15:57 
AnswerRe: How to get data from PHP into C# Windows Application? Pin
Vasudevan Deepak Kumar19-Mar-07 16:11
Vasudevan Deepak Kumar19-Mar-07 16:11 
QuestionRe: How to get data from PHP into C# Windows Application? Pin
Khoramdin19-Mar-07 16:21
Khoramdin19-Mar-07 16:21 
AnswerRe: How to get data from PHP into C# Windows Application? Pin
dsl/fahk19-Mar-07 16:41
dsl/fahk19-Mar-07 16:41 
AnswerRe: How to get data from PHP into C# Windows Application? Pin
Christian Graus19-Mar-07 16:45
protectorChristian Graus19-Mar-07 16:45 
QuestionRe: How to get data from PHP into C# Windows Application? Pin
Khoramdin19-Mar-07 20:51
Khoramdin19-Mar-07 20:51 
AnswerRe: How to get data from PHP into C# Windows Application? Pin
joon vh.20-Mar-07 0:49
joon vh.20-Mar-07 0:49 
QuestionIn a forms app, how to get a reference to object that has focus? Pin
sherifffruitfly19-Mar-07 14:15
sherifffruitfly19-Mar-07 14:15 
AnswerRe: In a forms app, how to get a reference to object that has focus? Pin
dsl/fahk19-Mar-07 16:05
dsl/fahk19-Mar-07 16:05 
GeneralRe: In a forms app, how to get a reference to object that has focus? Pin
sherifffruitfly19-Mar-07 17:32
sherifffruitfly19-Mar-07 17:32 
QuestionA simple soap client tutorial in C# Pin
Liottru19-Mar-07 12:58
Liottru19-Mar-07 12:58 
AnswerRe: A simple soap client tutorial in C# Pin
Vasudevan Deepak Kumar19-Mar-07 16:12
Vasudevan Deepak Kumar19-Mar-07 16:12 
GeneralRe: A simple soap client tutorial in C# Pin
Liottru19-Mar-07 22:16
Liottru19-Mar-07 22:16 
QuestionConvert DWORD value Pin
Wayne Phipps19-Mar-07 10:55
Wayne Phipps19-Mar-07 10:55 
Before I start, can I just say ARRRRRRRRRGHHHHHHHHHHHH!


Sorry about that, this has been doing my head in.....

I'm using a 3rd party COM object which they tell me returns "a DWORD defined as an unsigned long of four bytes".

According to MSDN, the correct way to represent a DWORD under .Net is as a Unit32 which is not CLS-compliant.
See this: http://msdn2.microsoft.com/en-us/library/ac7ay120.aspx

In one part of thier API, this value is split into 2 values. I am told that...
"The first 16 bits of the long becomes the first short, and the remaining 16 bits become the second short."

I'm not quite sure how to achieve the above.

They have used the operators >> and & in thier sample code. Having looked at their details on MSDN I am still n the dark.

I have addapted a sample and arrived at the following:
ushort argument1 =(ushort)(returnValue & 0xffff);
ushort argument2 =(ushort)(returnValue >> 16);


I am unsure if this is doing what I need, if so perhaps somone could explain what is happenning.

The only other idea I had was to convert the value into bits and then perform the required manipulation.

Any guidance would be much appreciated.




Regards

Wayne Phipps
____________

Time is the greatest teacher... unfortunately, it kills all of its students
View my Blog

AnswerRe: Convert DWORD value Pin
Ennis Ray Lynch, Jr.19-Mar-07 11:22
Ennis Ray Lynch, Jr.19-Mar-07 11:22 
GeneralRe: Convert DWORD value Pin
Wayne Phipps20-Mar-07 10:50
Wayne Phipps20-Mar-07 10:50 
GeneralBoolean Algebra Pin
Ennis Ray Lynch, Jr.20-Mar-07 13:21
Ennis Ray Lynch, Jr.20-Mar-07 13:21 

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.