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

C#

 
GeneralRe: Starting a Process without Windows "Run" Window Pin
Dave Kreskowiak27-Sep-06 9:13
mveDave Kreskowiak27-Sep-06 9:13 
GeneralRe: Starting a Process without Windows "Run" Window Pin
Gareth H27-Sep-06 23:03
Gareth H27-Sep-06 23:03 
GeneralRe: Starting a Process without Windows "Run" Window Pin
Dave Kreskowiak28-Sep-06 2:14
mveDave Kreskowiak28-Sep-06 2:14 
QuestionProgrammatically installing printer driver Pin
sharkbait27-Sep-06 7:47
sharkbait27-Sep-06 7:47 
AnswerRe: Programmatically installing printer driver Pin
Dave Kreskowiak27-Sep-06 10:14
mveDave Kreskowiak27-Sep-06 10:14 
Questionhow to print datagrid.rows in vs 2005 ? Pin
hdv21227-Sep-06 7:47
hdv21227-Sep-06 7:47 
AnswerRe: how to print datagrid.rows in vs 2005 ? Pin
Eric Dahlvang27-Sep-06 9:21
Eric Dahlvang27-Sep-06 9:21 
QuestionMarshal.Copy for ushort[]?! Pin
Daniel Strigl27-Sep-06 7:14
Daniel Strigl27-Sep-06 7:14 
I would need a function to copy unsigned short values from a IntPtr to a ushort[]-array, but the Marshal.Copy-function only support the short[]-array!

At the moment I do it the following way:
<br />
    ...    <br />
    <br />
    IntPtr pResult;<br />
    int len;<br />
<br />
    // this function is located in a DLL<br />
    CanIpuExecCmd(mid, hid, did, data, data.Length, out pResult, out len);<br />
<br />
    short[] tmp = new short[len];<br />
    Marshal.Copy(pResult, tmp, 0, len);<br />
    Marshal.FreeHGlobal(pResult);<br />
<br />
    ushort[] result = new ushort[tmp.Length];<br />
    System.Buffer.BlockCopy(tmp, 0, result, 0, len * 2);<br />
<br />
    return result; <br />

Is there no nicer way to do it?

Regards,
Daniel.
--
FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE. Wink | ;)

QuestionHow to find available RAM Pin
srev27-Sep-06 6:52
srev27-Sep-06 6:52 
AnswerRe: How to find available RAM Pin
Niiiissssshhhhhuuuuu27-Sep-06 7:29
Niiiissssshhhhhuuuuu27-Sep-06 7:29 
AnswerRe: How to find available RAM Pin
samtam27-Sep-06 19:23
samtam27-Sep-06 19:23 
GeneralRe: How to find available RAM Pin
srev27-Sep-06 23:10
srev27-Sep-06 23:10 
Questionfinding the Path of open files ? Pin
sundar15627-Sep-06 6:48
sundar15627-Sep-06 6:48 
AnswerRe: finding the Path of open files ? Pin
Niiiissssshhhhhuuuuu27-Sep-06 7:42
Niiiissssshhhhhuuuuu27-Sep-06 7:42 
GeneralRe: finding the Path of open files ? Pin
sundar15628-Sep-06 7:51
sundar15628-Sep-06 7:51 
Questionvalue transfer between 2 user controls Pin
raja.sanjeevkumar27-Sep-06 6:18
raja.sanjeevkumar27-Sep-06 6:18 
Questionrowvaliditing event does not fire on leaving the datagridview(customized) Pin
rajkaty27-Sep-06 5:42
rajkaty27-Sep-06 5:42 
QuestionChange backcolor of cell in datagridview Pin
rajkaty27-Sep-06 5:41
rajkaty27-Sep-06 5:41 
AnswerRe: Change backcolor of cell in datagridview Pin
Eric Dahlvang27-Sep-06 9:26
Eric Dahlvang27-Sep-06 9:26 
QuestionConverting C# Application to WEB Enabled . Pin
unitecsoft27-Sep-06 5:28
unitecsoft27-Sep-06 5:28 
AnswerRe: Converting C# Application to WEB Enabled . Pin
Colin Angus Mackay27-Sep-06 5:36
Colin Angus Mackay27-Sep-06 5:36 
AnswerRe: Converting C# Application to WEB Enabled . Pin
Michael P Butler27-Sep-06 6:37
Michael P Butler27-Sep-06 6:37 
AnswerRe: Converting C# Application to WEB Enabled . Pin
Dave Kreskowiak27-Sep-06 9:22
mveDave Kreskowiak27-Sep-06 9:22 
QuestionDateTime to Int conversion and vice versa Pin
madhusri27-Sep-06 5:04
madhusri27-Sep-06 5:04 
AnswerRe: DateTime to Int conversion and vice versa Pin
Ed.Poore27-Sep-06 5:21
Ed.Poore27-Sep-06 5: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.