Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
GeneralSocket.SetOption throw an exception on NT4 Pin
Sebastien Curutchet14-Nov-02 23:18
Sebastien Curutchet14-Nov-02 23:18 
GeneralMore DataGrid hassles. Pin
Christian Graus14-Nov-02 22:22
protectorChristian Graus14-Nov-02 22:22 
GeneralRe: More DataGrid hassles. Pin
Christian Graus14-Nov-02 22:37
protectorChristian Graus14-Nov-02 22:37 
GeneralRe: More DataGrid hassles. Pin
Mazdak16-Nov-02 5:36
Mazdak16-Nov-02 5:36 
GeneralRe: More DataGrid hassles. Pin
Christian Graus16-Nov-02 10:29
protectorChristian Graus16-Nov-02 10:29 
Questionhow to call a window application? Pin
Segal14-Nov-02 21:09
Segal14-Nov-02 21:09 
Generalpass an array from C# to a COM object Pin
gharrison14-Nov-02 21:05
gharrison14-Nov-02 21:05 
GeneralRe: pass an array from C# to a COM object Pin
Oleksandr Kucherenko15-Nov-02 3:21
Oleksandr Kucherenko15-Nov-02 3:21 
I do something like that:
<br />
    public int[] ColumnOrderArray<br />
    {<br />
      get<br />
      {<br />
        int iCount = m_ctrl.Columns.Count;<br />
        int[] array = new int[ iCount ];<br />
        <br />
        IntPtr ar = Marshal.AllocHGlobal( iCount * Marshal.SizeOf( typeof(int) ) );<br />
        Marshal.Copy( array, 0, ar, iCount );<br />
        <br />
        WindowsAPI.SendMessage( m_ctrl.Handle, LVM_GETCOLUMNORDERARRAY, iCount, ar );<br />
        Marshal.Copy( ar, array, 0, iCount );<br />
        Marshal.FreeHGlobal( ar );<br />
        return array;<br />
      }<br />
      set<br />
      {<br />
        int iCount = m_ctrl.Columns.Count;<br />
        if( value.Length > iCount || value.Length < iCount ) return;<br />
<br />
        IntPtr ar = Marshal.AllocHGlobal( iCount * Marshal.SizeOf( typeof(int) ) );<br />
        Marshal.Copy( value, 0, ar, iCount );<br />
        <br />
        WindowsAPI.SendMessage( m_ctrl.Handle, LVM_SETCOLUMNORDERARRAY, iCount, ar );<br />
        Marshal.FreeHGlobal( ar );<br />
      }<br />
    }<br />


For better solution look into MSDN by search criteria: Array NEAR COM NEAR Marshal

Alex Kucherenko
Questionusing "this"? Pin
zhoujun14-Nov-02 19:08
zhoujun14-Nov-02 19:08 
AnswerRe: using "this"? Pin
Christian Graus14-Nov-02 19:37
protectorChristian Graus14-Nov-02 19:37 
GeneralRe: using "this"? Pin
Kevin McFarlane15-Nov-02 2:17
Kevin McFarlane15-Nov-02 2:17 
GeneralRe: using "this"? Pin
MStanbrook15-Nov-02 4:40
MStanbrook15-Nov-02 4:40 
GeneralRe: using "this"? Pin
Michael Dunn16-Nov-02 5:29
sitebuilderMichael Dunn16-Nov-02 5:29 
AnswerRe: using "this"? Pin
Philip Fitzsimons15-Nov-02 10:55
Philip Fitzsimons15-Nov-02 10:55 
AnswerRe: using "this"? Pin
LongRange.Shooter18-Nov-02 8:54
LongRange.Shooter18-Nov-02 8:54 
GeneralNeed a function that will return certain system information into a text box Pin
Derek Smigelski14-Nov-02 13:20
Derek Smigelski14-Nov-02 13:20 
GeneralRe: Need a function that will return certain system information into a text box Pin
Chris Austin14-Nov-02 17:37
Chris Austin14-Nov-02 17:37 
GeneralRe: Need a function that will return certain system information into a text box Pin
Chris Austin14-Nov-02 18:26
Chris Austin14-Nov-02 18:26 
GeneralMoving VB's FileSystemObject to C# Pin
Eric Miller Jr.14-Nov-02 10:54
sussEric Miller Jr.14-Nov-02 10:54 
GeneralRe: Moving VB's FileSystemObject to C# Pin
Steven Lyons14-Nov-02 15:07
Steven Lyons14-Nov-02 15:07 
GeneralRe: Just hints! Pin
Masaaki Onishi14-Nov-02 17:46
Masaaki Onishi14-Nov-02 17:46 
GeneralRe: Moving VB's FileSystemObject to C# Pin
Richard Deeming15-Nov-02 0:09
mveRichard Deeming15-Nov-02 0:09 
GeneralRe: Moving VB's FileSystemObject to C# Pin
joan_fl15-Nov-02 9:06
joan_fl15-Nov-02 9:06 
GeneralRe: Moving VB's FileSystemObject to C# Pin
Eric Miller Jr.15-Nov-02 10:46
sussEric Miller Jr.15-Nov-02 10:46 
QuestionScroll a window? Pin
Bog14-Nov-02 9:33
Bog14-Nov-02 9:33 

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.