Search results for query: *

  1. T

    vc++ to vb.net

    Is the DLL a managed or unmanaged piece of code? You can't access an unmanaged DLL by referencing it. (Unless it is a COM DLL). Instead you need to use the DECLARE keyword in your code to define the entry points you wish to use. Once the entry point is defined using DECLARE, you can just call...
  2. T

    Killing Threads

    Are using Thread.Sleep inside your threads? If so, you may want to use a signaling mechanism instead of timed loops.
  3. T

    Hello I need help on an assignment (loops)

    You need to put a loop around updating your str1 variable similar to the way you did for your str2. Otherwise you just add one "*" and a vbNewLine every time you go through the big loop. Add the vbNewLine to str1 after you exit loop. (Just as you did for str2). Hint: For y = x To 1 Step -1
  4. T

    Try...Catch help

    Here are my thoughts: Exceptions are expensive, no doubt. But, this is the way the .NET runtime handles errors. I agree with trying to avoid them. But you can make a mess for yourself if you try and mix too many different error handling schemes in your design. If it really is an...
  5. T

    encrypt password

    An easy and secure method is to use the SHA256 algorithm on your string. SHA is a one way hashing algorithm that is designed to create a unique hash value for your string. You just save the hash value into the database instead of the password. The next time a user enters his password, just...
  6. T

    A few questions about XML

    You didn't show what this entry is inside of. I' assume it is something like: <forecast> <day d="0" ...> ... more subnodes.... </day> <day d="1" ...> . . . <day d="5" ...> ... more subnodes.... </day> </forecast> If this is the case you can get each node by doing what you originally were...
  7. T

    A few questions about XML

    Good news. I always say that learning VB.NET is 10% language and 90% framework myself. The framework has so many good things in it. But, they can be hard to find when you first start out.
  8. T

    A few questions about XML

    This is very close. The thing you are missing is that SelectNodes returns all of the nodes matching the string you specify. In your case this is the one node "/weather/cc". So your For Each Look is still working at the wrong level of the XML tree. You may want to try something more like...
  9. T

    A few questions about XML

    Here's another link for you: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemxmlxmldocumentclassloadtopic2.asp The Load Method takes as a parameter the URL of the file you wish to access.
  10. T

    A few questions about XML

    There is some sample code here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemxmlxmlnodeclasschildnodestopic.asp
  11. T

    A few questions about XML

    You can access elements in the XML directly using the XMLDocument class in the System.XML namespace. This will be more effeicient than trying to create your own array structure. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemxmlxmldocumentclasstopic.asp
  12. T

    Err.Number and Exception.HResult the same thing?

    Thanks JohnH. This link confirms what I already know. (I am screwed). Unfortunately, it looks like I need to redo my exception processing after my migration to .NET. The HResult is only used by COM interop and can no longer be relied upon when catching my custom exceptions using On Error...
  13. T

    Err.Number and Exception.HResult the same thing?

    I still am struggling a bit with this issue. Does anyone know of any detailed documents that describe how the HResult property of the Exception class is used? So far, I can only deduce that it is used for COM Interop. Any help would be greatly appreciated!
  14. T

    Err.Number and Exception.HResult the same thing?

    I understand that. In the old mixed version of my code I was actually going the other way. My managed code was raising exceptions to the VB6 classes. (Through COM Interop). That is why I was setting the HResult in my custom exceptions so the VB6 code would get the correct Err.Number. (This...
  15. T

    Err.Number and Exception.HResult the same thing?

    The only reason it is an issue is because I previously had a mix of VB.NET and VB6 code. In the old environment my VB.NET code was raising exceptions via COM interop to the VB6 code. (Using HResult). I recently converted all of the old VB6 code to .NET. In my new environment I understand...
  16. T

    debug question

    The best way is to add all of your DLLs into a single solution and debug the entire solution. That way they are all automatically built every time you debug. VB.NET is nice because even if you don't bring a DLL up into the debugger you can still step through the source code. (Providing you...
  17. T

    debug question

    The DLL your are debugging does not match the source code.
  18. T

    Err.Number and Exception.HResult the same thing?

    I've recently converted some VB 6 code over that used the old non-structured exception handling. I also have some .NET classes that raise custom exception classes. When the code was VB6 I used to expose my .NET classes using COM interop and errors raised from .NET classes were being caught...
  19. T

    Managing Large VB.NET Solutions

    I have a Windows Application that has been ported from VB6 to VB.NET using VS 2003. The code conversion was painful but almost complete. But, now I am having trouble because the original application had so many different DLL files associated with it. The application itself is designed to be...
Back
Top