Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Tron

Page 1 of 20 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    1
    Views
    205

    Re: Creating a loop around a checkedbox

    Something like this will read until there is no more data to read.

    If you are looking at toggling on and off the actual read process you'll probably need to fire off a worker thread that checks...
  2. Replies
    0
    Views
    193

    DataContract and WebMessageFormat.Json

    I have endpoint that is returning a list of objects. Within that object is a string data member that happens to hold a string that is already in JSON format. WCF is serializing my object. Because...
  3. Re: Converting C to C# - question about typedef voids

    This thread may help explain structures and PInvoke().

    http://forums.codeguru.com/showthread.php?541025-RESOLVED-Wrapper-from-C-to-C&highlight=Pinvoke

    Can you post a function prototype from one...
  4. Replies
    2
    Views
    356

    Re: how make a button to open an image?

    Check out OpenFileDialog class and PictureBox control:




    OpenFileDialog ofd = new OpenFileDialog();
    ofd.InitialDirectory = ".";
    ofd.Title = "Select Document Image";
    ofd.DefaultExt = "tif";...
  5. Replies
    1
    Views
    298

    Re: Can't add DataRow to DataTable

    Please share the code that updates the columns within the row with data.
  6. Replies
    8
    Views
    1,838

    Re: Wrapper from C++ to C#

    Depending on the members of NET_DVR_VICOLOR, NET_DVR_VILOST_V30 and NET_DVR_HIDEALARM_V30 this line of the structure may be the most tricky.



    public NET_DVR_SHELTER[] struShelter = new...
  7. Replies
    8
    Views
    1,838

    Re: Wrapper from C++ to C#

    I think you may want to change this:


    [DllImport("TruVNetSDK.dll")]
    public static extern bool NET_DVR_GetDVRConfig(int lUserID, uint dwCommand, int lChannel, IntPtr lpOutBuffer, uint...
  8. Replies
    8
    Views
    1,838

    Re: Wrapper from C++ to C#

    Actually in your case you most likely need the following line instead of Marshal.Copy().



    Marshal.StructureToPtr(myStruct, pStruct, false)
  9. Replies
    8
    Views
    1,838

    Re: Wrapper from C++ to C#

    The first method works because you are receiving the structure from the API so a pointer will do the trick.

    To send structures to the API you'll have to do more.

    Something like this:



    ...
  10. Replies
    8
    Views
    1,838

    Re: Wrapper from C++ to C#

    You need to change your marshalling a bit.



    public static extern int NET_DVR_Login_V30(string sDVRIP, int wDVRPort, string sUserName, string sPassword, out LPNET_DVR_DEVICEINFO_V30...
  11. Re: Marshal C struct containing pointer to other C struct

    [DllImport("thirdpartydll.dll", CharSet = CharSet.Auto)]
    public static extern IntPtr LoadImg([MarshalAs(UnmanagedType.LPStr)] string FileName);

    [DllImport("thirdpartydll.dll",...
  12. Re: Marshal C struct containing pointer to other C struct

    I first tried these P/Invokes



    [DllImport("thirdpartydll.dll", CharSet = CharSet.Auto)]
    public static extern IntPtr LoadImg([MarshalAs(UnmanagedType.LPStr)] string FileName);
    ...
  13. [RESOLVED] Marshal C struct containing pointer to other C struct

    I have a DLL written in C that I must use in my C# application.

    The C declarations for the two functions in question are as follows:



    IMGSTRUCT *LoadImg(const char *filename)
    int...
  14. Re: EnumFontFamiliesEx callback only being called once

    Thank you so much! It works now!!!
  15. [RESOLVED] EnumFontFamiliesEx callback only being called once

    I found this code posted form 2010. It is supposed to enum all the fonts on the system including those registered dynamically using the gdi32.dll call AddFontResource().

    My understanding is that...
  16. Replies
    2
    Views
    1,161

    Re: DataColumn AllowDBnull help.

    Something like this will work as well and you will have zero (or whatever default value you choose) for your int value when the DB field is NULL.



    SqlDataReader rdr;
    ...
    int myInt =...
  17. Replies
    8
    Views
    465

    Re: NullReferenceException!

    Wrap that code in something like this:

    if (((dataGridView1 != null) && (dataGridView1.Rows.Count > 0))
  18. Re: Datagridview rowenter ALWAYS enter first row before entering selected row

    Is the method getting called more often that you would expect? Perhaps you need to turn off the row_enter event until later in your program?

    Like this for example:


    ...
  19. Replies
    2
    Views
    841

    Re: ODBCDataReader Crash Issue

    I would think the issue is with the data in the db field.

    Verify the data does not contain any strange characters or otherwise invalid data.
  20. Replies
    3
    Views
    2,135

    Re: Reading SQL OUTPUT Parameter Value

    I seem to recall something about having to close the reader before some values are returned from the stored procedure.

    I could not locate my code for this however.
  21. Replies
    3
    Views
    1,089

    Re: How to Stop OleDbDataReader Getting NULL(s)

    string myField = reader.IsDBNull(0) ? String.Empty : reader.GetString(0);
  22. Re: Accessing 32 bit registry node when the application is running on 64 bit machine

    Worst comes to worst you can copy the settings where you need them to be.

    REG COPY "HKLM\SOFTWARE\Wow6432Node\MyCo\MyApp" "HKLM\SOFTWARE\MyCo\MyApp" /s
  23. Re: I'm trying to make a multiple choice adventure game

    Check out the OnKeyDown() event.
  24. Re: How to add a record if the result of a SQL query is empty

    Change the SQL Statement:



    Select * from v2007


    Select
    coalesce (Name, "none"),
    coalesce (SomeTextField, "none"),
  25. Replies
    1
    Views
    649

    Re: C# fires up Reporting Service?

    Look at these classes:

    ReportingService2005 rs = new ReportingService2005();
    ReportExecutionService rptExeSrv = new ReportExecutionService();

    And specifically:

    results =...
Results 1 to 25 of 487
Page 1 of 20 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center