Jump to content
Xtreme .Net Talk

jayy66

Members
  • Posts

    14
  • Joined

  • Last visited

About jayy66

  • Birthday 07/07/1981

Personal Information

  • Occupation
    Programmer
  • Visual Studio .NET Version
    Visual Basic .NET Standard, Visual Studio .NET Pro
  • .NET Preferred Language
    vb.net

jayy66's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. You can store your connection string settings in an app.config file. That way if you ever have to change the settings, for whatever reason, you can do it wthout having to rebuild your solution. At least thats how I've done it in the past. I hope that was helpful.
  2. The code is being run from a class method and checkInboxTimer is a class variable. The class is question is instantiate in the form load of the main form. What I getting from your post is that once the program exits the class the timer will be subject to GC. How can I prevent this from happening?
  3. Does anyone know how to keep a threading.timer from being garbage collected? The timer works fine and mutiple threads are usually running without any problems, however, when the GC is executed the timers are disposed of. Anybody have any ideas? Dim timerDelegate As Threading.TimerCallback = AddressOf Me.SendFaxResponse checkInboxTimer = New System.Threading.Timer(timerDelegate, Nothing, 60000, 20000)
  4. Hello everyone, Im trying to view ports on a fax server to determine if they are in free or being used. I tried using FaxCom.dll and faxcomex.dll with no luck. Here is my code usind faxcom.dll: Dim faxSvr As New FAXCOMLib.FaxServer Dim fs As FAXCOMLib.FaxStatus Dim fp As FAXCOMLib.FaxPorts Dim IsRecieving As Integer Dim IsSending As Integer Dim counter As Integer Dim freePort As Integer = 0 faxSvr.Connect(Server) fp = faxSvr.GetPorts For counter = 1 To fp.Count fs = fp.Item(counter) IsRecieving = fs.Receive IsSending = fs.Send If IsRecieving > 0 And IsSending > 0 Then 'freeport remains unchanged Else freePort = freePort + 1 End If Next faxSvr.Disconnect() Return freePort the error occurs at fp = faxSvr.GetPorts but there is no confirmation that I am successfully connecting to the server in the line before. Does anybody know why this error is occuring?? Or better yet, does anybody know of a alternative way of doing this?? Thankx
  5. Hello everyone, I need to create a windows service that will monitor the emails on an exchange server. I really dont know where to begin. The service needs to check the server every 60 seconds and parse the text in each email to determine priority. I know how timers work...I've just never coded something of this nature before. If anyone has any sample code or links to get me started, i would really appreciate it. Thanks.
  6. Sorry for the confusion but you're right that does work. My problem was the path wasn't correctly stated. Thanks. and by the way, i was looking for an alternative way to display the bitmap since i couldn't get: BackGroundImage = New Bitmap(ImageFileName) to work correctly and i had been tyring to find my problem for two days now. its funny how the smallest things are always overlooked. thanks again.
  7. Well, i figured out how to convert a bitmap into a byte array. I use this to save signatures from a pocket pc emulator. How would I convert the byte array back to a bitmap to display what i had previously saved. I found something like this on the internet: Dim BackGroundImage As Bitmap Dim ImageFileName As String = "path" BackGroundImage = New Bitmap(ImageFileName) GraphicsHandle = Graphics.FromImage(BackGroundImage) but that doesn't seem to be working. i get an "Exception" error on BackGroundImage = New bitmap(imagefilename) Any thoughts??
  8. You could try licArr.Items.Count That worked for me.
  9. FYI I used a WMI connection to send in the admin credentials and eureka!
  10. I figured it out. Vb And Vba Program Settings didn't exist for the computer i was testing on. Duh
  11. I've been looking around for a solution but still haven't come across anything. My scenerio: bob is logged in to computer A with his username and pass. I connect to computer A with a WMI connection using an admin name and pass. When I connect to computer A i have complete administrative priviledges, however, when look in the registry settings a cannot view the current settings for Bob. Is there a way for me to revert back to bobs login credentials once i have logged in with admin credentials??? Hope someone has some input for me.
  12. I'm trying to retrieve values from a remote registry. I have successfully connected to the remote computer using WMI (system.management). I have an error in my code below. Dim strKeyPath As String = "Software\VB and VBA Program Settings\Current" Dim Values() As String Dim options As New ConnectionOptions options.Username = "username" options.Password = "password" Dim scope As New ManagementScope("\\" + PCname + "\root\default", options) scope.Options.EnablePrivileges = True scope.Options.Impersonation = ImpersonationLevel.Impersonate scope.Connect() If scope.IsConnected Then 'Dim objClass As New ManagementClass(scope, New ManagementPath("StdRegProv"), Nothing) Dim objClass As New ManagementClass("StdRegProv") objClass.Scope = scope Dim objBase As ManagementBaseObject objBase = objClass.GetMethodParameters("GetStringValue") objBase.SetPropertyValue("hDefKey", CType("&H" & Hex(RegistryHive.CurrentUser), Long)) objBase.SetPropertyValue("sSubKeyName", strKeyPath) objBase.SetPropertyValue("sValueName", "Name") objBase = objClass.InvokeMethod("GetStringValue", objBase, Nothing) Values = CType(objBase.Properties.Item("sValue").Value, String()) Does anyone see the error in my code?? Nothing ever gets set into Values.
  13. Hi, I kinda new to vb.net so bare with me. I'm have an app that needs to connect to different computers on the same network. I need to know what the best approach would be. If anybody has any suggestions or sample code, it would really help. Thankz
  14. I'm currently working on an app that can view the registrys on remote computers located on the same server. I can successfully view some of the registry keys but when i try to access "HKEY_CURRENT_USER\Software\VB and VBA Program Settings" i get an "Access Denied" Message. After doing some research i found out that i have to have admin rights on those machines in order to access all the registry keys. My question is: Is there a way to send in the admin credentials in order to have access to the registry keys?? Or is there another way to go about this?? i have the admin username and password. I just don't have a means of sending it to the proper machines. Thanks
×
×
  • Create New...