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

Search:

Type: Posts; User: someuser77

Page 1 of 4 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    4
    Views
    6,765

    Re: Oracle Exception

    Try setting Visual Studio to break execution when an exception is thrown on all Common Language Runtime Exceptions so when you get one of those exceptions you can examine them.

    How to: Break When...
  2. Replies
    4
    Views
    6,765

    Re: Oracle Exception

    Where do you get this output? Can you provide the exception details with the stack trace? Are you running within Visual Studio? If so try to use the 'Copy exception details to the clipboard' option...
  3. Re: Incrementing values in multi threaded application

    By 'unprotected read access' you mean that two threads can read the same value, NOT that a thread can read the wrong value, right?
    As I understand it reading primitive types (except long on 32 bit)...
  4. Replies
    13
    Views
    1,690

    Re: Newbie here - a few questions..

    Assuming you are using Visual Studio, try to use the debugger to find out what went wrong or attach the project to a message so we can take a look at the code. You will probably need to test for a...
  5. Replies
    2
    Views
    3,011

    Re: Signed or Unsigned DLL

    If you have the .NET SDK you can use the Strong Name Tool with the -Tp switch:

    sn -Tp C:\WINNT\Microsoft.NET\Framework\v2.0.50727\System.dll
    If you get a "... does not represent a strongly named...
  6. Re: Wrapping FindFirstFile with SafeHandle derived class

    I changed the SafeFindHandle in FindClose to IntPtr, looks okay I guess. Thanks TheGreatCthulhu!

    public static class Win32FindFile
    {
    //...
  7. Re: Wrapping FindFirstFile with SafeHandle derived class

    The SafeHandle example uses the SecurityPermission and the SuppressUnmanagedCodeSecurity so I wonder if I should too.


    That depends, if I only override ReleaseHandle and the FindClose signature...
  8. Re: Wrapping FindFirstFile with SafeHandle derived class

    I'm implementing a SafeFindHandle, not a SafeFileHandle.
    I'm doing so because the handle returned by FindFirstFile needs to be closed using FindClose and not the CloseHandle function.
    The strange...
  9. Replies
    2
    Views
    4,454

    Re: 2D Vector math library

    Try the Vector type from Math.NET
  10. Replies
    2
    Views
    3,671

    Re: Battleships program C# help

    Hey,

    It is, look into the Console.ReadLine method.

    I think you should split this into two stages, first of all work a way to represent the game board in-memory, maybe as a Multidimensional...
  11. [RESOLVED] Wrapping FindFirstFile with SafeHandle derived class

    Hello,
    I'm trying to call the Windows API functions FindFirstFile, FindNextFile and FindClose and unlike the 'WINAPI FindFirstFile & FindNextFile problem' thread I'm not using IntPtr but a...
  12. Re: Foreach Collection of ComboBox in a Tab Panel

    Use the C# as operator to test if a control is a ComboBox.

    foreach (TabPage tab in tabControl1.Controls)
    {
    foreach (Control control in tab.Controls)
    {
    ComboBox comboBox = control as...
  13. Replies
    2
    Views
    1,235

    Re: post build conditions

    What about:

    move /y $(TargetFileName) $(TargetName).customextention
  14. Replies
    2
    Views
    2,684

    Re: Hash algorithm in GetHashCode() Function

    That depends on who's GetHashCode() are you asking?

    GetHashCode() is a virtual method that is inherited from System.Object. As such, the System.Object.GetHashCode default implementation cannot...
  15. Thread: Regex issue

    by someuser77
    Replies
    4
    Views
    928

    Re: Regex issue

    RedBully,
    If you end the regex with the 'end-of-string' anchor why do you add the negative lookahead for digits?
  16. Replies
    1
    Views
    717

    Re: Threading in C sharp

    I'm not sure why you have 11 threads but you can investigate it using windbg and SOS.
    I compiled and executed the code you provided under 32 bit .NET 2.0, attached windbg, loaded SOS and examined...
  17. Replies
    1
    Views
    1,013

    Re: Help with delegate and async callback

    I'm not an expert but creating an event in the Client class that will fire when the onConnect method is called, and having MainForm register to the event with the client variable may work.
    Something...
  18. Replies
    1
    Views
    937

    Re: Can not resolve dynamic TreeView Issue

    Hi ricky_cpp,
    You wrote 'TreeView' in the title so I assume you are using a System.Windows.Forms.TreeNode but the idea should work for other tree types.
    If you receive the variables as input one...
  19. Replies
    4
    Views
    1,121

    Re: Simple function question

    Hi sko,
    It looks like you are trying to write to 'buffer' without allocating it first.
    You should first create the string array and then try to write to it. Because you probably do not know the...
  20. Replies
    1
    Views
    1,002

    Re: How to compile multiple .cs?

    Well, if all the classes are under the same namespace you can use CompileAssemblyFromSource, for multiple files you can use CompileAssemblyFromFile with multiple file names.
  21. Re: The correct way of releasing resources in multiple error checking scenario?

    The shared_ptr acts similar to creating a struct that wraps the resource, without all the extra types.
    Is there a disadvantage for using shared_ptr? Should I prefer the struct wrap?
  22. Re: The correct way of releasing resources in multiple error checking scenario?

    Thank you for your comments.
    I used shared_ptr and changed my code from:


    LPVOID pFile = GetViewOfFile(fileName);
    to:


    void ReleaseFileView(LPVOID pFile)
    {
  23. The correct way of releasing resources in multiple error checking scenario?

    I am writing a small program in C++ that works with a file mapped with MapViewOfFile and as I process the file there are multiple cases where I might encounter an error and the file mapping should be...
  24. Replies
    4
    Views
    765

    Re: Can't use the array

    When creating an array to hold reference types like you did you only allocate the space needed to hold 1000 references to 'myName'. Once you have enough space to hold the references to all the...
  25. Replies
    10
    Views
    6,472

    Re: Why no error message from the exception ?

    Hello 5883,
    Is the behavior you described consistent or are there occasions when you do see the exception message box?
    Can you post a working part of the code that reproduces the issue?
    If so I...
Results 1 to 25 of 90
Page 1 of 4 1 2 3 4





Click Here to Expand Forum to Full Width

Featured