Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. Winforms under .Net 2.0 also has a backgroundworker component (or something like that) - only dabbled with it but it might make your life easier.
  2. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatadatarowcollectionclassremovetopic.asp and http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatadatarowclassdeletetopic.asp are the two links worth reading. Brief summary to delete a Row call the .Delete method as this marks it for deletion, .Remove is the same as calling .Delete followed by .AcceptChanges and will result in it no longer being seen as a modified row.
  3. Also the CLRProfiler from MS can be a very useful tool
  4. You also need to make sure the catch block also returns a value.
  5. It simply means there are no Debug Symbols on your machine for the particular file in question - this is normal for the OS Dlls. The lack of these will not prevent your application running - it might help if you posted the relevant startup code for your application. I'm guessing you are running a sub Main (void Main for C#) that launches a window and then exits. you need to look at the Application.Run method.
  6. Could you attach the program or a cut down version that exhibits this behaviour?
  7. The new controls will not work with the VS 2002 / 2003 IDEs, they are designed for VS 2005 use.
  8. I'm guessing this is an ASP.Net application based on the Assembly name (it really helps if people post queries in the correct forum). If that is the case then there are known issues in moving between the 2002 / 2003 way of doing web apps and the 2005 way. Probably the best place to look is Scott Guthrie's Blogg, specifically http://weblogs.asp.net/scottgu/archive/2005/12/18/433484.aspx and http://weblogs.asp.net/scottgu/archive/2005/12/18/433484.aspx are probably the most relevant.
  9. If you wanted a string representation of whatever ponter holds you could always do Dim pointer as Object = a msgbox pointer.ToString() 'or as this is .Net MessageBox.Show(pointer.ToString() If on the otherhand you want the object variable to now point to whatever memory location a was then that is a different matter. It may help if you give an idea of why you need this functionality as there may be a simpler / better / more .Net way of getting the desired result.
  10. If auditing is enabled on the PC in question (can be setup through Administrative Tools -> Local Security Settings -> Local Policies -> Audit Policy) then this information will be logged into the standard Security Event Log. This information can then be accessed through code via the EventLog class System.Diagnostics.EventLog evt = new System.Diagnostics.EventLog(); evt.Log="Security"; foreach(System.Diagnostics.EventLogEntry entry in evt.Entries) { //do stuff with entry here }
  11. The IIS setting only affects pages serverd by IIS (asp etc.) anything that is served by .Net will use the web.config setting.
  12. Use the code I posted yesterday with Convert.ToBase64String / .FromBase64String to handle a string representation of the data.
  13. If you are deploying a web application you don't need to deploy any of the code-behind files anyway, the code is compiled into the \bin\whatever.dll.
  14. IIRC .IndexOf calls the .Equals method of the class to compare them and decide if they are the ame or not - for reference types this simply checks if the object is in the same memory location and doesn't compare the values themselves. To make this work you will need to override the Equals method in your Item class to perform a compare of two Item objects.
  15. Remoting has it's own particular file format for configuration, This Link gives a detailed example / usage of it.
  16. The .GetHashCode inherited from System.Object isn't a cryptographically sound hashing routine and shouldn't be relied on for passwords etc. it is mainly used to determine the uniqueness of an object within the running application and most definitely not between executions and versions. If you are wanting to use this for passwords or similar you should really be looking at one of the hashing classes under System.Security.Cryptography such as MD5 (although this has recently be found to have limitations) or one of the SHA variants.
  17. They use an extended procedure, not a stored procedure. What you are trying to do isn't really possible with a UDF - there may be some convoluted way to make this happen but it probably isn't worth the effort. You are probably better off just using a stored proc to achieve your aim with this.
  18. Like marble_eater showed in his above post
  19. A quick sample hacked from your code - rather than loading and saving the key & IV anywhere they are just displayed / read from a couple of textboxes. Text to encrypt is entered into the large textbox and will be written out to a file, decrypted text will be displayed in a label beneath it. WindowsApplication1Vb.zip
  20. How are you saving / loading the Key and IV? Is there any chance you could attach a simple app that exhibits this problem?
  21. Too be honest converting to and from a string like that has many possible failings, any conversions assume a corresponding character mapping for any given byte sequence; and more importantly that it will always be converted back the same way. If you are just after a string that can be stored in a config file or similar Base64 encoding is probably your best bet. You could replace your two methods will direct calls to Convert.ToBase64String and Convert.FromBase64String.
  22. Have you tried using the same encoding for both operations? In the convert to string routine you use ascii while converting back you use unicode.
  23. If you create a setup project there is an option to install the prerequisites from the same location as the installer - if you are shipping on CD etc then this will just require them to be in the same folder, if the user is being given a zip (or similar) include them there. If they are downloading via the web then if they are accesible at the same URL it will download them on demand if the user doesn't already have them installed.
  24. Could you post the string literal that tempCostIDs contains when you are executing the .IndexOf? If it really contains the correct string then it should be returning a value > 0
  25. Assuming you are using the WMI server explorer addin, something like Dim printers As ROOT.CIMV2.Printer.PrinterCollection printers = ROOT.CIMV2.Printer.GetInstances() For Each p As ROOT.CIMV2.Printer In printers Next should allow you to loop over all installed printers.
×
×
  • Create New...