Click here to Skip to main content
13,201,940 members (75,727 online)

Comments by ledtech3 (Top 200 by date)

ledtech3 11-Aug-17 9:44am View
Thanks for the reference.
ledtech3 6-Aug-17 19:15pm View
looks like a possible copy paste problem here too "cmd.Parameters.AddWithValue("[@Ethnic", TextBox6.Text)"
ledtech3 16-Jan-17 23:43pm View
The problem I was having was that the Dot Net framework was not handling those Unauthorized access permissions so you need to build your program to handle those your self. It does not matter if you are Admin or not. As Dave said we just do not have the permissions for some files or folders and the framework can't handle the errors.
ledtech3 28-Jun-15 10:17am View
Great, glad you got it.
Now that I'm not so tired.
To explain the original problem, the code generated in the try catch statement was first checking for a invalid cast exception such as string to integer or casting/converting to something that is not supported.
If it never hit that type exception then it would never throw the new exception of the DB.Null.
To me that is a Bug in the Code generator.
Also since it is using "CType" that is why I think the generator is of a "C,C++ or C#" flavor.
ledtech3 27-Jun-15 23:46pm View
The property is expecting a string if it is cast to db.null then possibly that is it.
If you want a empty string(cell) then perhaps string.empty would be better.
Also is this code converted from C# to VB.Net ?
ledtech3 10-May-15 11:08am View
depending on what is hapening on the system that could be hundreds of times in different threads.
I've never tried that and don't have time to research how to do it right now.

There are a few articles on this site about creating key loggers in different ways, some in C# they should give some help.

off hand the only way I can think of is to get information from the file system driver.

You will have to do the Research for the type you want to catch.

You could also try using Sysinternals Process Monitor and filter on "Catagory is Write" and just show the file activity.
ledtech3 9-May-15 18:25pm View
key loggers have a few ways to do the logging, once you understand how they work then you can look at what gets installed as a driver or a service or just a normal program running on the system.
It could be Kernel mode or User mode depending on how well they want to hide it. Even if it is dumped straight to memory and never touches the disk it can still be found.It would have to register some way with the system so that the keystrokes will be returned.
Again you would have to understand "How" the various types work in order to catch them on install. You can not rely on a file signiture
ledtech3 16-Mar-15 5:25am View
Glad you found the answer.
If you unblock the zip file before extraction then it unblocks every thing in it.
ledtech3 15-Mar-15 10:20am View
The first thing I noticed was you didn't "Unblock" the downloaded files which does not appear to be a problem, next once you made a change to the file you did not appear to save it before refreshing the page.
I only watched the video once say may have amissed something.
ledtech3 2-Nov-14 17:49pm View
Great glad you solved it.
ledtech3 2-Nov-14 14:07pm View
By the looks of your second screen shot it appears that the null reference is that it did not pick up the value of the text box.
and mabey something like this could help.

Public Square as integer
If txtsquare.text = nothing then
msgbox("No Number Added")
exit sub
elseif isnumeric(txtsquare.text) = false then
msgbox("Input is not a number")
exit sub
square = txtSquare.Text

Then step thru the code in the debugger to verify what square is equal to
I'm not sure why you are subtracting 1
ledtech3 12-Oct-14 11:24am View
double check the spelling of the items in your list box you are selecting to the items in your select case statement.

your code appears to be compairing the item in the list box to the select statement.

If they are not the same that can cause a null reference exception.
ledtech3 13-Sep-14 11:41am View
It all boils down to permissions (DACL) on the process and the "Integrety Level" of it and also if it is a "protected process" or not.
ledtech3 7-Sep-14 15:47pm View
without more information you may need to add a user agent string.
ledtech3 27-Aug-14 19:06pm View
Great glad you have it going.
ledtech3 26-Aug-14 18:52pm View
ok so you are viewing the document in web browser control instead of opening it in one note, Is that correct ?
ledtech3 17-Aug-14 22:06pm View
I wish you well on that one then. Whish I could see it from your side.

I recently made a Desktop screen capture program that will take multiple screenshots once a button is clicked. I had to sleep it about a half a second to keep my form out of the first shot.
ledtech3 17-Aug-14 15:14pm View
This sounds like a school project.
In order to "Code" an Anti Virus program you first have to understand how they work.

Most of it would need to be done in "Unmanaged Code" (not VB.Net or C#) for the drivers required or allot of PInvoking.
ledtech3 17-Aug-14 13:23pm View
Did you get the problem solved ?
I hate Flash also.
ledtech3 14-Aug-14 12:21pm View
You might be able to find something using process monitor (access denied's , not found etc.) or wireshark to view the network traffic.
I have run across a flash video triggering a (DRM) protection in ie and the video card.
I've found no good way to track flash problems from the user end. Getting the debugging mode version just slows things down.

Only other suggestion would to add more dugging output to help track what and where it is going wrong.
ledtech3 14-Aug-14 11:45am View
Is this the "New Metro" interface IE or the normal Windows forms Style one ?

One of the strange things about Flash in IE is if Content filtering is enabled on a page Flash does not work at least in IE 9. I haven't messed much with the Win 8 version much.
I meant tracking protection in IE braks Flash.
ledtech3 14-Aug-14 11:29am View
Have you tried using either the F12 developer tools built in or Fiddler?
ledtech3 14-Aug-14 0:52am View
Google and msdn are your friend.
ledtech3 6-Jul-14 1:11am View
Take a closer look.
It is baisicly creating a list of Char but instead of the normal index number being 0 to x
it is (0,0) (0,1) etc..

I think an easier way to do it is to is to just create a list of Integer array and select a index value of 0 to x and out put the integer array.
I finally got that to work.
ledtech3 31-May-14 9:35am View
Not knowing how how your program works.
Have you tried setting the font for the data before sending it to print ?
ledtech3 24-Apr-14 16:33pm View
You are welcome.
I wish you well on your project.
ledtech3 2-Apr-14 5:51am View
without testing the code myself, it seemed like it was not getting byte #38 but bytes 0 thru 37.
If that theory is correct then it will never = 48 because it will always be 38 bytes long not 1 byte.
A little testing on a different project I realised I was mistaken on my thinking. You are getting the Index value not that amount of bytes.
Rememnber to check if you are working on a 0 based index or a 1 based index.
That was what I am running into now with a project I'm testing.
ledtech3 28-Mar-14 6:04am View
Would not this line be saying you want 38 bytes ?
If byteRead(38) = 48 Then

you might want to step thru it in the debugger to see what you are getting or andd more feed back.
ledtech3 8-Mar-14 11:14am View
I sounds like you need to run your program as a windows service under the system account.
ledtech3 18-Jan-14 18:27pm View
you want to convert a tree view control for a registry editor to Java ?

Or just part of it ?
ledtech3 16-Nov-13 12:01pm View
It would depend on what you would want to do with the data.
If you just want it as a string then you may have trouble sorting data by that column.

If you store it as a standard date/time then you can sort by that and "Display" it on a form how ever you want by converting it.
ledtech3 2-Nov-13 15:10pm View
Thanks I had already figured out the part you showed but did not undersatand what else was supposed to go in there.
Thank You for your time.
ledtech3 2-Nov-13 0:55am View
Yea, thats why I had to break down and ask the question here.
MSDN documentation does not always make sense.
Or have sample code that does even close to what you want to do.
Or expain it the way you did.
Thanks again.
ledtech3 2-Nov-13 0:40am View
That pretty much answers my question then.
I will have to build a sample application for studying more advanced ways of using it.
ledtech3 2-Nov-13 0:27am View
So any property you would need can be done that way ?
No other stuff needs to be added ?
So many examples do things a little different it was difficult to understand what they were wanting in the get and set.
Some times the simplest things are the hardest to grasp.
ledtech3 1-Nov-13 23:01pm View
I found that but what I'm trying to figure out is if anything else is supposed to go in the get or set like most of the tutorials I have read on it.
Return TheDataSet
End Get

Plus I'm using VS 2008 and that does not work like that there.(not exactly)
It does in VS 2010 but I don't use it unless I have to it on a different os boot.
ledtech3 29-Oct-13 12:04pm View
I see the RegistryView Start working with .Net 4.0 and not available in .net 3.5
Good to know about RegistryView it can save some code then.
ledtech3 28-Oct-13 11:29am View
After testing your code and watching what it does it appears that all it does is parse the Update log file located at.

So you may need to find out if there is a result code for removed updates in order not to display them.

I found the page that list the result codes but Uninstall is not listed there.
ledtech3 24-Oct-13 11:50am View
That worked fine in my test sample.
Just had to remove the semicolon at the end and "Dim" it up for VB.Net
Thanks for another way to do it.
ledtech3 24-Oct-13 11:27am View
Something like this.
Dim inputStr As String = tbInput.Text
Dim output As String
output = Replace(inputStr, " ", "")
tbOutput.Text = output

Input is: This Text Has space
Output is: ThisTextHasspace
ledtech3 24-Oct-13 11:04am View
you are using all 3 at the same time?
I would think it should be throwing some kind of error.

I think part of the problem is you are baisicly resseting the output to what the input was.
without being able to step thru it see what it is doing.
use a different variable name for the output as you do for the input and see what happens.
ledtech3 24-Oct-13 10:49am View
Without more code to view where you are checking the lenth.
You may be only returning the original variable length not the trimmed length.
you may try to asign the output of the trim /replace function to another variable and check the length of that.
ledtech3 8-Sep-13 0:28am View
This might help.
Troubleshooting Exceptions: System.OutOfMemoryException
ledtech3 8-Sep-13 0:10am View
Are you wanting to kill the task as in task Scheduler that launches a process?
Or processes itself ?

Just Killing every thing like you are doing is a bad idea.
you need to target "A" "Process" not all of them.
Most system required processes when killed will cause a shutdown.

If there is a certain problem you are trying to solve we may be able to point you in the right direction.
A certain process slowing the system down, a certain task the starts at a bad time ect.
ledtech3 3-Sep-13 13:17pm View
Great I'm glad you got it to work for what you needed :)
ledtech3 27-Aug-13 0:06am View
Will the path always be the same, but file name different ? If so take a close look at the last one I answered for you.
ledtech3 26-Aug-13 23:02pm View
Not me but this might be a start, it has a link to the specification for a shapefile.
ledtech3 26-Aug-13 22:22pm View
Unsubscribe from what ?
ledtech3 25-Aug-13 0:01am View
you seem to be missing some information from your question.

Your question reads to me that you are getting a list of file with the size of them output into a listbox.

Answer #1 is attempting to give you a total amount of items in your listbox but not sure why they are tying it that way.

To get the number of items in a listbox just do.
Dim TotalItems As Integer
TotalItems = ListBox1.Items.Count
Label1.Text = TotalItems.ToString
ledtech3 20-Aug-13 14:36pm View
Is the project in question a .Net 2.0 or .net 4.0 ?
He reminded me that.

.NET 2.0 runs as 64bit on 64bit, so the pointer size will be 64bit.

.NET 4.0 runs as 32bit on 64bit, so the pointer size will be 32bit.
ledtech3 20-Aug-13 14:05pm View
Sorry he must have missed that part, I'm replying to his second respone now. I'll let you know what he says.
ledtech3 20-Aug-13 13:53pm View
I contaccted a Microsoft Senior Escalation Engineer I've emailed before and he said.
"Change it to the type it should be -- unsigned long."

[DllImport("netapi32.dll", EntryPoint = "NetDfsMove", CharSet = CharSet.Unicode, ExactSpelling = true, CallingConvention = CallingConvention.StdCall, SetLastError = true)]

public static extern int NetDfsMove


[MarshalAs(UnmanagedType.LPWStr)]string PathName,

[MarshalAs(UnmanagedType.LPWStr)]string NewPathName,

unsigned long Flags
hope that helps
ledtech3 19-Aug-13 23:36pm View
From a little demo app I built called get bytes.
See how it is different.
Input String:

54 65 73 74
0 54 0 65 0 73 0 74
54 65 73 74
54 0 65 0 73 0 74 0
54 0 0 0 65 0 0 0 73 0 0 0 74 0 0 0
54 0 0 0 65 0 0 0 73 0 0 0 74 0 0 0
54 65 73 74
ledtech3 19-Aug-13 23:04pm View
Looking back at the data types, what if you changed the
int Flags
uint Flags
base types that the .NET Framework supplies
Platform Invoke Data Types

That error seems to have more to do with a integer type than a string type where ever you look.

Edit: Forgot to reread the otherinfo before posting the above.
How about if you set the char set as ANSI instead of Unicode ? unicode is wider.
ledtech3 18-Aug-13 13:08pm View
Let us know how it turns out please :)
ledtech3 18-Aug-13 10:03am View
Have you tried to run the code to see if it even matters ?
Does it crash or throw errors on that value ?
Unless I'm not seeing something that seems to be the correct way to do the call.
It is a string.
Perhaps the program that showed the error is Wrong ?
You may drop them an email to ask them why their program showed it as an error.
ledtech3 18-Aug-13 1:05am View
Look at this page and see if that helps.

And looks down at the LPWStr

Or this one
ledtech3 17-Aug-13 10:46am View
You might be able to use RegX to get the "Index" location.

Then output them to your xml file.
ledtech3 14-Aug-13 9:51am View
Here possibly this will help
the sample uses a counter on the length of the string to print.
While the length is greater than 0 then e.HasMorePages=true else e.HasMorePages=false

I'm not sure what you are doing there to be honest
ledtech3 13-Aug-13 13:13pm View
Ok great I was worried that you could not download it.
ledtech3 13-Aug-13 10:23am View
without seeing more code it sounds like you are setting has more pages to true,but when it gets to the last page it is not getting set back to false, so just keeps printing until you stop it.

possibly need a counter to count the pages and then count up to the number of pages or down to zero then set has more pages to false .
ledtech3 13-Aug-13 10:15am View
Were you able to download and try it out ?
ledtech3 12-Aug-13 10:05am View
Sorry the line wrapped and it just looked that way at first.
Best I can tell when the event does fire it is running all 4 events you have above it.
Not sure why you are doing it that way either.

What are you wanting it to do?

They have a built in row selection.
ledtech3 11-Aug-13 19:08pm View
It looks like I can not reply by private email here for some reason.
so here is a link to my skydrive.
The Zip file name is
The first part was an attemt to test your code the last button opens the form with the Adobe reader control.
There is also a short readme in the zip file
ledtech3 11-Aug-13 11:15am View
let me know if you need my sample project,built in VS 2008 and I can email it to you or post it to my skydrive.
ledtech3 11-Aug-13 10:36am View
Another note.
After building the last version it automaticly copies 2 of the Adobe dll's to the output folder, so reader may not need to be installed as long as these are with it.
I havent tested that on a system that does not have reader.
ledtech3 10-Aug-13 12:50pm View
Glad it helped :)
ledtech3 9-Aug-13 19:55pm View
Glad you solved your problem
ledtech3 9-Aug-13 14:38pm View
I was trying last night to get one to work and the best I got so far was to return the entire string.
The sample provided that is supposed to only return what is between the tags is not returning anything when dropped into a sample application.
I'm still trying to see what works.
ledtech3 8-Aug-13 21:37pm View
Are you trying to get the whole line or just the value ?
I forgot about this
Is has a listing in it for Html tags.
ledtech3 8-Aug-13 21:28pm View
The error sounds more like a path problem than a security problem.
But It may be an acced denied but returning the not available.
Impersonate: Just a couple of the links found
ledtech3 1-Aug-13 23:32pm View
it sounds like when the form opens it is trying to automaticly loginto the server.
1: Possibly the server is not available, or has shut down ?
2: the login information is not correct or possibly it is expired ?
3: it can't find the database ?
Is this a web application, a windows forms application, or a wfp application ?
ledtech3 1-Aug-13 15:40pm View
you don't have a datagrid view in your toolbox to drop in (windows forms) ?

Or are you trying to work in WPF?
Mabey this will help.
ledtech3 1-Aug-13 13:21pm View
Great,glad to hear it.
ledtech3 31-Jul-13 17:47pm View
I guess I should have said use the string like SA said and not the string reader but also look at "matches"
ledtech3 31-Jul-13 17:03pm View
I havn't gotten comfortable posting things as a solution.
But with code samples you have to or it dosen't look right.
ledtech3 31-Jul-13 16:33pm View
Not sure what your trying to match there but you might try looking at Matches instead of Match.
ledtech3 26-Jun-13 9:39am View
Without seeing how you fully implemented the code, can you Change the column name of one of the data grid views but still be bound to the same source?

Say like one has a name like MessageType1,'Message Type' and the other is MessageType2,'Message Type'
ledtech3 9-Jun-13 14:00pm View
Reason for my vote of 5 \n Great resource
ledtech3 6-Jun-13 9:49am View
Got it.See article Here.
ledtech3 1-Jun-13 9:25am View
I was able to piece together a vb script that will dump the security descriptor in sddl string format using WMI.
I still need to figure it out in VB.Net and how to Pinvoke it.
ledtech3 28-May-13 23:49pm View
Well for one thing your "End Structure" for "block" is After "End Function" for "co"
as far as I know you can't do that.
ledtech3 28-May-13 22:42pm View
Side Note:
What has me stumped is the siginiture of the parameter "psd"
In the original C++ code it shows
in that would read
Dim psd as PSECURITY_DESCRIPTOR = nothing.
But there is no "type" PSECURITY_DESCRIPTOR in
if you follow what "PSECURITY_DESCRIPTOR" is thru the header files.
typedef void *PVOID; From ntdef.h

Then PSECURITY_DESCRIPTOR is of type Void and according to an article I read, in VB.Net you should use System.Intptr
And not SECURITY_DESCRIPTOR the Structure like I originally tried.

So back to reread again and again.
Till it Finally sinks in.
ledtech3 28-May-13 17:57pm View
Do to the size of the Code sample I have provided the Link to the C++ code at the end of the Question.
ledtech3 21-Mar-13 20:34pm View
Actually if you try a simple test of 2 textboxes on a form and No ContextMenuStrip you can copy prepopulated text from the first textbox and right click and paste to the Second.

Or if you add a ContextMenuStrip then enable it in the control you want it to paste to you could do something like this in the Click event.
Private Sub PasteToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PasteToolStripMenuItem1.Click
Dim pasteString As String = My.Computer.Clipboard.GetText
TextBox1.Text = pasteString
End Sub
ledtech3 3-Dec-12 20:47pm View
Maybe I should have gotten some sleep and tried it again in the morning. : s
But maybe this will help someone else.
ledtech3 3-Dec-12 12:10pm View
I tired that but I guess I was to broad on what I had inside of the try catch
I have a half a dozen 2005 books and none help with that problem.
I know it was a easy fix but I just couldn't think of it at 2 am and get it to work.
Thanks for your help. Works great.
ledtech3 3-Dec-12 9:57am View
I have accepted this as the Solution since it first mentioned using XML.
The RaptorDB is way to advanced for me. SqlLite still requires extra files and I never did get far enough with it to be able to impliment a test project to see how to use it.
ledtech3 30-Nov-12 11:32am View
I'm thinking this may be the way to go for this project.
Encrypting a dataset using AES
I just have to finish converting it from a WPF (VS 2010) to A Win Form version (VS2008).
ledtech3 23-Nov-12 0:30am View
It is begining to look like I will have to learn how to use the API function QueryServiceObjectSecurity located here Then I can convert it to the String Format found here
ledtech3 13-Nov-12 20:19pm View
Thanks, we can only try.
ledtech3 13-Nov-12 19:53pm View
That is just a direct conversion from the C# code.
Without knowing how you are wanting to use it with the new VB.Net application I can't suggest to you how to implement it.
the main part of the code that dosen't deal with the form is.
' alamat registry
Dim abc As String = "Software\trialsoftware\keyz"
Dim scr As New Class1()

Dim logic As Boolean = scr.Algorithm("indonesiaitintelijensi", abc)
If logic = True Then

It also looks to be calling to "Class1" what ever that is.
ledtech3 5-Nov-12 20:54pm View
Thanks, Just found this and looked it up.I may have to try it out for converting some C# projects.I have one I need to get done than has been on and off the burner for a couple of years.
Hope your project completed well.
BTW Corsair never did return my email about the serial number format.
ledtech3 23-Sep-12 13:40pm View
There seems to be a big black hole around this subject.
The closest I have come so far a a Lone Header file called "DeviceCategories.h" Located on my system in "C:\Program Files\Microsoft SDKs\Windows\v7.1\Include"
With a Line that reads:
Using a strings utility it does not show up listed as a include for any other file in that directory.
ledtech3 23-Sep-12 9:15am View
I have not found any sample code yet.
ledtech3 22-Sep-12 17:35pm View
I found a real interesting C# Download that will Enum the USB hubs then the connected devices to a treeview controll.
the C# worked great on my system, but the version didn't work after the upgrade.
Another thing I just realized is the PC Wizard shows a "Serial Number" for usb devices but it is not a "Serial Number" it is a "Volume Serial Number" which can be found using the Win32_LogicalDisk class.
I sent them a Email to let them know.
Just wanted to pass that along.
ledtech3 21-Sep-12 19:53pm View
with out seeing the full code, would the ".Controls.Clear()" clear what was created above it?
ledtech3 21-Sep-12 19:32pm View
You could do a search here something like this.
Search "Video Chat" project here on CP
ledtech3 21-Sep-12 9:47am View
I was looking for the serial, even if it returns "Null" or "Nothing".
So many say it is part of the PNP Device ID Or something like that. But I still havent gotten Corsair to reply back yet on What the serial numer IS supposed to look like.
And how you got it to launch another app.
I got side tracked and din't get to test out any of the code I found.
ledtech3 19-Sep-12 22:58pm View
I'm glad you were able to work it out. I got sidetracked once I Found the API calls for getting the Serial number From a USB device that way.There were so many wasy listed on the internet I wasn't sure what the real serial number was supposed to look like.Here is the link if you are interested.
I would love to see the code. I have been searching thru C++, C#, and code to see what others have done.
ledtech3 18-Sep-12 11:04am View
I don't know about you but i'm starting to go cross eyed trying to sort out all of the different API calls to do different things.
ledtech3 18-Sep-12 10:25am View
It sounds like your printer driver may be hung.
Most printers have a section in their manual to trouble shoot that problem.
They usually have you unplug the usb cable and then unplug the power in some order.
If you know what the driver name is you can also try to restart the driver using the Services control manager. Lexmark generally start the Friendly name with "Lxd..."
You may also need to restart the "PrintSpooler" service if you just try the restarting method.
ledtech3 17-Sep-12 8:56am View
It says It is paused and you Have a Paper Jam.
Try pulling all of the paper out of the feeder and reinsert.
Also check for other paper stuck somwhere in the printer.
That should fix it.
ledtech3 16-Sep-12 14:01pm View
Here Is another Link that you May find Usefull.
Interactive Services:

I am piecing together a List of Helpful Link for Building Services.
ledtech3 16-Sep-12 11:36am View
I discovered that the Link I gave for the Desktop Dosent have links on the page to go to the video.
Here is a Direct link to the Video.
ledtech3 16-Sep-12 1:35am View
That Event, Event ID 11 is being logged in the System log because of removing the usb drive with out "Ejecting" it first. If you eject it and then removed the USB Drive the Entry is not set.My starts are logged in the Application Log.
ledtech3 16-Sep-12 0:50am View
@djdynamix That version did not have the usb code in it. This one does.
In the mean time I had to Dump the VM after it went crazy, plus the the USB would not work like it was suposed to. So I moved over to the Win 7 Partition and Updated it, tweaked the task bar to look Like Vista (mostly) upgraded messenger and tweaked it so it would get out of the task bar and back to the notification area.
So I got the new version to install and it actually worked. Now to get it to do something besides write logs.But the event Log Shows a strange Error I have never Seen before. "The driver detected a controller error on \Device\Harddisk4\DR8" That is the USB Device.
ledtech3 15-Sep-12 20:02pm View
I was hoping that might help.
I just found that Link about 20 minuets ago in a search and have been studying the code.
Thanks. I have been wanting to do this for some time. I also found the API references for getting the Serial number of the usb device and was looking into how i might slide that in somewher too.
ledtech3 15-Sep-12 16:02pm View
Just found this, not sure why I haven't read it before now.
It is about the Privilages for LocalSystem.
ledtech3 15-Sep-12 15:46pm View
Do you have the link to that Info that you were able to get the service to work.
I've installed the VS 2012 Pro version to a 64 Bit Win7 Ultimate VM and changed the target .Net version to 3.5 and was able to build, install and control the service. I havent added any real things to do with it yet.
It looks like most things that you can do from a service would need to be a result of some kind of Event.
ledtech3 14-Sep-12 10:35am View
I discovered last night why I can't get a service to work, it is not supported in VS 2008 Standard edition, which I got as a MS partner. in my action pack Subscription.As it says in the top here.
I will have to set up a trial of the pro or other version in a vm.
ledtech3 13-Sep-12 23:18pm View
I found a project here that may be close to what you may want.
I have converted the code to vb and am looking at how it may be used.
ledtech3 13-Sep-12 12:51pm View
Ok it has been a while since I've work with those commands
ledtech3 13-Sep-12 12:50pm View
Rather than worrying about the user account for that matter if the service is running as "System" then it can do what ever it wants, So let the service run the update As was suggested above and not even have to worry about swapping the User type. I have never Successufly built a 'Service so I have been researching it to See if I can build Something to demonstrate what I am thinking of.
ledtech3 12-Sep-12 17:29pm View
After looking at changing the User Account type. You can run into problems, if that ends up being the last Admin Account on the system. I think it would be Less trouble to just Enable and disable the account rather than having the overhead of changing the account type. If I am not Mistaken the Delete command would delete the entire account.
your service could enable the Admin account, then show it on the login screen. Do what needs to be done Log out of the account and then on removing the drive disable and hide the account.
Hows that ?
ledtech3 12-Sep-12 13:30pm View
As far as running prior to logon, that is normaly a logon script, which can do almost anything.
Look at this TechEd 2012 Video also.
Total Desktop Lockdown: Your Action Plan
He shows some intersting things that might give you more ideas.

Here is some UAC info.
Let me know if there is something I missed.
the user account type is set when the account is created and don't believe that it can be changed.
Still looking into that part, but you would still need admin or system rights to change the setting.
ledtech3 12-Sep-12 10:38am View
OOps, This was supposed to be in the comments above.
ledtech3 12-Sep-12 1:44am View
I have a sample program written (VB.Net) for Viewing if there is a Hidden account on a system, it also has the ability to create the registry section and add users to the hidden list.Then hide or unhide the user. That is just a matter of changing a setting to un hide the account.
If that would be of any help.
As far as using a USB key, normally those are locked down to keep just anyone from walking up and plugging it in.
You could possibly subscribe to the usb insertion event, then once the drive is ready then check the drive for a Certificate as mentoned above. If it matches then enable the account that matches. You would still need to disable it on completion or on removal event disable the account. One other problem I can think of is Security for the USB key. You may also tie It to the Serial number of the USB key so the cert can't just be copied to another key and used.
ledtech3 12-Sep-12 0:24am View
It looks like you are trying to throw and catch the same exception.
I normaly Code this way in VB.


Catch ex As Exception
End Try
Here is a converted version from VB to C#
try {
} catch (Exception ex) {
ledtech3 6-Sep-12 23:09pm View
Without seeing the source code.
It Looks like Your program may be shutting down the device on close. When your program opens up again the Device is not able to Automaticly start with your program, so Windows 7 is trying to Give an option of Which device for your program to use.
Is the web cam Listed ?
ledtech3 16-Aug-12 15:54pm View
Have you tried to restart your system. Then navigate to your projects folder to get a copy, or view it that way. The Solution file may have been corrupted.
You most likely will not see it in task mgr. Try running Sysinternals Process explorer. It is better than Task mgr.
ledtech3 16-Aug-12 4:43am View
This is a snippet from the page listed below. It was aimed at C++ game developers but the UAC information may be of some help.

Registry access by a standard user is restricted in a similar fashion as the file system. A standard user is permitted read access to all keys in the registry; however, write access is only granted to the HKEY_CURRENT_USER (HKCU) subtree, which is mapped internally to the user-specific subkey HKEY_USERS\Security ID (SID) of current user. An application that needs to write to any registry location other than HKEY_CURRENT_USER requires administrative privileges.

Page this comes from.
ledtech3 15-Aug-12 9:50am View
I seen one help article where they could run it "without debugging" but would crash "with debugging". Another thought is possibly that the program is holding on to a memory location or a file and it is not being released upon closing the project. Then when it it trys to run again it is getting a access violation. You may try a simple system restart and see if you can access it then. If that dosent help you can also try running process Monitor in the back ground to see what is happening. program located here.
If you do not know how to use the program then you can watch one or some of the "Case of the unexplained" videos and that should help.
ledtech3 15-Aug-12 9:24am View
Most anti- malware / antivirus programs us a signature based approach, they have some form of signature for the Bad files, that is what all of the updates are for. They also use a heuristics based approach where if something is acting a certain way then they alert you and /or hopefully block the code and shut it down.
ledtech3 12-Aug-12 12:17pm View
I think it will just give the end part after
Just add a text box to the form and set the textbox1.text = uploadRequestString and see what it gives you.
It is quick to add and just as quick to remove again when you see what you get.
ledtech3 12-Aug-12 10:05am View
will Getting the information in this line.
string uploadRequestString = "image=" + sb.ToString() + "&key=" + imgurApiKey
and having a textbox or or label = to "uploadRequestString" help any ?
ledtech3 12-Aug-12 9:38am View
Here is another link. I made a Forms app from this one. For Quick reference.
Changed the Link to the C# version instead of the VB.Net version.
ledtech3 10-Aug-12 8:51am View
Another thing I just thought of is if it is still hanging the system,then after you disable it. If you haven't already done so Check the Event logs and see if it tells you any thing.Also locate the driver in Device manager and see if it can shed some light, It may be found under non plug and play section.
Or you can create a dump and try viewing that.
ledtech3 8-Jul-12 11:46am View
No problem, hope it helps.
ledtech3 6-Jul-12 23:59pm View
For Facebook you can look at the API Here
ledtech3 2-Jul-12 19:50pm View
I was going to suggest that this morning but ran out of time after stepping the code.I also noted that if the Program is run under Vista or win 7 with UAC enabled you may have trouble with the location you are trying to create the folder and file in with out being elevated.
My 5 Dave.
ledtech3 1-Jul-12 1:05am View
The hardest part some times is finding the "Right" Questions :)
ledtech3 30-Jun-12 16:27pm View
Yes, the RaptorDB does look interesting,I will have to take a closer look at it, already went thru the article.
As sqlite has been sugested twice now,I was looking into that but am having trouble finding information on how to use it with a windows forms.
ledtech3 20-Jun-12 23:55pm View
here is a code converter you can try In the future.
Remember not all C# converts well to VB.Net
ledtech3 20-Jun-12 0:07am View
It was the Best product I could find at the time after trying several.Haven't Compaired them for a few years. I'm not worried about it being marked as an answer Just wanted to let them know about it.
And I see you are using your full name now ?
ledtech3 19-Jun-12 18:12pm View
I use Axialis IconWorkshop Located here
ledtech3 18-Jun-12 17:47pm View
Can you just and an
Else If Len(sFormatNo)= FORMATNOLGTH2 then
If (the code to check like the other one)
ledtech3 15-Jun-12 23:39pm View
From the Code you posted, it Looks Like they are Getting the Exact same Registry key If it is 32 or 64 bit.
Are you trying to find out if the system you are trying to connect is 32 or 64 bit ? I have written programs for getting information from the registry that work on both 32 and 64 bit systems, but I have not done remote Registry. Is there something Different about remote than local ?
ledtech3 14-Jun-12 12:01pm View
Although your code didn’t get me totally where I wanted to be, it did answer the original question about handling the unauthorized access exception.
So I marked your answer as the answer and gave you a 5.
Thanks again for your time and posting the code.
ledtech3 14-Jun-12 11:19am View
I have a fast machine too, just allot of files to go thru.the folder (C:\Users\David\AppData\Local) is 19.5 GB. I'll have to run it in a background worker for when the start folder has allot of sub folders and files, that should solve the problem and allow me to minimize the UI while the search is going on. Thanks again for your post.
ledtech3 14-Jun-12 10:58am View
OOps I got tripped up by "Optional ByVal recurseSubdirectories As Boolean = True" I input false and forgot to change it.

What it is throwing Is
ContextSwitchDeadlock was detected
Message: The CLR has been unable to transition from COM context 0x1c751600 to COM context 0x1c751850 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.
But if you click continue and leave it alone it does Finish and return the list.
ledtech3 14-Jun-12 10:46am View
Sorry, had some Coffee now, I redid the sample App and your code works fine by itself. It was my Modified version that was the problem. It is when I try to also return what folders are throwing the exception where I run into a problem,That code is messed up now trying several different things.
What I am trying to do is get the list of files that a string is found in, also get a list that throw the exception so I can go in by hand and verifiy what I am Looking for is not hidden there.
ledtech3 14-Jun-12 9:37am View
I wasn't using any threading or back ground worker, so after 60 seconds it was saying that it was not responding or in a deadlock condition.I was running this thru the debugger too.And waited several minuets after pressing the continue or ok button and it did not apear to be doing anything looking at it thru Process Explorer. I thought at first it was just because I was trying to return the seach for the files in the start folder and return the found files to the same listbox. but after commenting out the first part it still had the same effect. But If you just get a list of sub folders it is done in a couple of seconds.My test Folder is the C:\Users\David\AppData because I know there are a few folders that will trip the exception.
ledtech3 13-Jun-12 11:44am View
This part of that statement Just Sunk in,"but with default values for the row"
ledtech3 13-Jun-12 11:28am View
So does that mean you need to use "NewRow" Instead of "ImportRow" to get it to add properly to an existing table Accoring to that page?
ledtech3 12-Jun-12 23:53pm View
Instead of using list(of Datarow) can you use system.Data.DataRowCollection ?
Not Sure how to Use it , just found it in the object browser.
ledtech3 11-Jun-12 15:31pm View
If I use it as is with recurse = True then I get a deadlock condition error if not running inside of a background worker.

Something Interesting I’ve found while testing my code using
Is that it never Threw a UnauthorizedAccessException
While stepping thru the code to get the list of folders.
ledtech3 11-Jun-12 11:06am View
I started Wroking with the Idea Of a List of subfolders catching the Access Denied ones.
But my current version was a not very good.
I'll try your example and let you know.
Thanks for the post
ledtech3 10-Jun-12 12:04pm View
Try,in the solution explorer, my project,Application tab,assembly information button, netural language, then select 1 from the list,
as Far as I know that should set the application to that Language.
If you want more information on that setting just press F1 once you get there.
ledtech3 10-Jun-12 0:18am View
the object browser has CopyToDataTable listed as in

just drop CopyToDataTable into the object browser search and you should find 3 references.
Hope that helps some.
ledtech3 9-Jun-12 13:14pm View
I can't if you should take it or not but mabey this link will help for more Info.
Here is the Wiki version
ledtech3 4-Jun-12 21:36pm View
try adding a try catch
Your Code here
Catch ex As Exception
End Try
ledtech3 4-Jun-12 15:43pm View
I’m not sure what you are trying to do here.
Using and testing the code you supplied along with what I added to get it to load.
The button1
Click is taking the number from textbox 2 and creating that many rows, and 1 column
If you keep clicking on button 1 then it keeps adding rows and columns till it gets an error.
Button 2
Click will keep adding the value in from textbox2 to the next row till amount rows in that text box -1 and you get an out of range exception.
Button 3
Who know what you are trying to do here.
You appear to be trying to multiply two cells of the datagridview but unless you clicked button1 and button 2 multi times you only have 1 Cell with data in it.
You keep reusing the same letters and nothing is declared in the click events so they must be global variables.
Such as Private i as Integer
Also you need to add more error handling which could help you figure out what is going on.
Such as try catch blocks
Personally while I am testing I like to add extra throw away text boxes to see the values that I am getting at different points.
Takes a little more time in the beginning but can point you to problems quicker some times.
Just remember to get rid of the references in the code when you get rid of the text boxes.
ledtech3 4-Jun-12 14:25pm View
After adding extra code to get it to load i got the error at this line
x = x + DataGridView1.Item(j, i).Value * DataGridView1.Item(j + 1, i + 1).Value

Try setting a break point there and hover the pointer over i,j,b, x1, and oters to see what the values are. you may need to step once to get the error and to gett the values.
That should point you to the problem.
ledtech3 4-Jun-12 10:10am View
What I have Seen so far in the reading, It looks like it can be very troublesome, also I think one of those links I posted actually suggest Not to use it.
ledtech3 4-Jun-12 8:53am View
I just found this,as a MS support page
Here is the page,Titled How to set a hook in Visual Basic .NET
This was at the bottem of the page.
Global hooks are not supported in the .NET Framework.
There is code on the page that may help do what you want.
ledtech3 3-Jun-12 19:28pm View
Me either,
you could probley use the built in click events instead of the API functions, depending on what you are trying to do. Try looking at this.
ledtech3 3-Jun-12 15:33pm View
I don't really understand your code but by the error it seems like it may be tied to this.
Private Delegate Function LowLevelMouseHookProc(ByVal nCode As Integer, _
ByVal wParam As Integer, _
ByRef lParam As MSLLHOOKSTRUCT) As Integer
ledtech3 3-Jun-12 11:10am View
Found a Class and function here
That works around the problem but the output is not what I want yet.
It still needs some tweaking or a rewrite using the same Idea.
ledtech3 3-Jun-12 4:43am View
What is this part here in the middle
" Me.TmbRefResh_Click(sender, e)
Does that look like it keeps refreshing itself.
and what events does Application.DoEvents(), Do ? It calls it several times.
Jusy my opinion but I would think it would be better to get a list of the Checked items and Like Tim Corey said do a for each on them instead of the nested nightmare.
I never used a Do events so I had to Look it up. and here
Looks like it works differently between VB 6 and .Net 4.0
ledtech3 29-May-12 9:17am View
Thanks for the information. I'll start looking into that now.
ledtech3 28-May-12 14:11pm View
back looking at the code again.
The problem is the way microsoft handles the error (or dosen't) in the function
"FindInFiles"(dPath, searchtext, True, FileIO.SearchOption.SearchAllSubDirectories, wildcards)
It starts by searching for all files and folders in the Start directory that you choose.
If one of the folders it finds is a Reparse point or a Redirect and/or wont allow access then it throws the error and exits the function. So unless you search just the folders or files them selfs then that function may not do much good

The actual error that it trips is.

So I have to create a new function that does properly handle the error.
It just exits the search as is with no results returned.
ledtech3 27-May-12 20:32pm View
2 more links If you have not already found them>
Edit: removed a Comment.
ledtech3 27-May-12 1:42am View
Here are some links that may help. There are several things that could be missing that I can find just looking at the documentaion.
The last Item is a Location based projject that you might get some ides from also.
ledtech3 27-May-12 1:07am View
I was looking at that. I finaly got the Motodev IDE to Install corectly,but it is not like working in Visual Studio.
I ran across something that may help but I have to find it again. On google code site.
ledtech3 26-May-12 14:09pm View
Mabey this older Post will help.
ledtech3 26-May-12 13:24pm View
According to there site They may be using port 8833 instead of 8085.
Try these 2 links
ledtech3 24-May-12 15:17pm View
This Page Might help Some.
ledtech3 22-May-12 16:26pm View
Which browser do you use and what version
using IE9
Go to the upper right hand corner of an Open IE Screen

Left Click on the Gear Symbol

Left click on manage addons
A Manage add-ons window will open.

You can then View what is enabled or disabled.

Left clicking on an Item under the name colmn will allow you to enable or disable and item.
Also I Just realised I said Process Monitor above instead of Process Explorer.
ledtech3 21-May-12 21:46pm View
I'm not sure why you would want to do it but you may be able to tie them all to a index value with some on change event handlers for the sliders and index values.
ledtech3 20-May-12 11:00am View
Dang I missed your reply again,for some reason I am not getting emails notices for allot of messages that people replyed to .can you send me a copy of the program and a screen shot of the problem.

you can email me at
ledtech3 20-May-12 10:43am View
I hope I have been of some help.
ledtech3 19-May-12 20:37pm View
Only other thing i can think of without looking at the actual code and walking thru it is, to treat the alert as a seperate application. When the alert is triggered then if , your main app is open use it or if not then start a new app that contains just the alert window and also starts the media player for the sound.
It sounds like something is closing the window or not alowing it to open before you can see it.
ledtech3 19-May-12 10:59am View
No problem hope it helps.
ledtech3 19-May-12 2:04am View
Something else I just thought of, on a regular system when you play a short 1 or 2 second sound file you don't have to end it. So do you even need the
"mp.stop();" to start with ?
ledtech3 19-May-12 1:51am View
So it is starting the media player but not your Alert box.
What happens if you put the "mp.stop();"
at the end, will that give the dialog a chance to show before it closes the media player. I was wondering if it was the media player that had
"stopped unexpectedly"
ledtech3 18-May-12 21:36pm View
you could always start here.
ledtech3 18-May-12 21:26pm View
Have you read my article yet ?
This May or May not Explain a few thing.
ledtech3 18-May-12 17:03pm View
Does the app need to "Get Focus" before it trys to pop up the alert.
I can't get the Android IDE to work right on my System so I can't test any Ideas.
ledtech3 18-May-12 15:53pm View
In the code above then,Remove the "Result = False" then and add a message box just before the catch statement and see if it is returning anything true when "Return Result" returns False, if it is then it is a problem with the code that calls the function if not then perhaps the credintals are invalid. Thats just the way I catch some of the problems.Or step thru the code in the debugger and see what the value is inside of the try/catch block.
ledtech3 18-May-12 15:42pm View
Have you tried the code without it set to False ?
ledtech3 18-May-12 15:07pm View
The alarm needs to be active at all times waiting for a event to trigger it, then it can start something else or pop up the screen.
Like when waiting for a file or folder change event. If the event listener is not running then it can not respond to a event.
You may want to see if there is a event you could subscribe to to allow it to trigger your app.
Hope this helps some.
ledtech3 18-May-12 14:03pm View
try removing the "= False" from "Dim Result As Boolean = False" and see what happens.
By declareing it to false outside of your try catch block, not matter what happens inside it will always revert to False once leaving the try /catch.
ledtech3 18-May-12 11:07am View
Glad you got it Solved.
ledtech3 17-May-12 9:37am View
After some testing using the PasswordTextBox_KeyDown event you can append however many Character you want per Character entered up to the max limit for the control then you get a buffer overflow. But it would take allot of code to make it robust enough to handle the delete or other KeyDown events. If you remove the constraints of <=1 from the sample above then it just automatically keeps appending itself till you get a buffer overflow.
ledtech3 16-May-12 19:41pm View
I'm not a aspx guy but the line asp:Label ID="m" runat="server"

seems to be the only reference to "m" that I see. So I would think that the label ID of "m" would be what was showing the text "StuffToShow" ,also there is no "text =" there. Would adding a "Text = m.text" do any good ?
ledtech3 15-May-12 17:38pm View
Not all classes have instances of them. Sometimes you have to “Create” an instance to the class before you can use them. By using the "New" keyword you created an instance to the class, thus allowing you to be able to interface with it.
The best I know (I’m still learning this stuff myself) you can study Interface and abstract classes to get a better understanding. Here is a link to MSDN to get you started.
Hope this helps some.
ledtech3 6-May-12 12:02pm View
Just reread your question again try looking at the manifest file for the program and see if it has this in it.

requestedexecutionlevel uiaccess="false" level="requireAdministrator"

That will make the shield Icon appear over the normal one.The file may have needed to be signed to make that work also.
had to remove the brackets < or it hid the sample.
ledtech3 6-May-12 11:56am View
Was looking into something else and I think what you are talking about is when you right clcik on a file like whatever.exe then you have a menu option to run as Admin. Those settings are set in the registry usaly as a per file type setting. Look at this key HKEY_CLASSES_ROOT\exefile\shell\runas . If that is removed then that file type should no longer support the right click option. you may back up that key first, in case you want to easly retore it.
ledtech3 20-Apr-12 21:20pm View
Will do,
been trying to teach myself this stuff for several years with just old books and the internet.Piece together a piece of code here and there till I understand what it is doing, and how. Still need to go back to the books to learn the boring(but important) stuff I glossed over thru the years.
ledtech3 20-Apr-12 20:17pm View
as it turns out I already had another project built using this
it is fast and returns the correct results,Just at the time I didn't understand the results.
Thanks again, here is your green buttong check.
ledtech3 20-Apr-12 19:27pm View
I'll go back over it again.
Thanks again for your help.
ledtech3 20-Apr-12 18:14pm View
Sotra like this.
IEnumerable(Of T) Interface
Public Interface IEnumerable(Of Out T) _
Inherits IEnumerable

It took me the longest time to figure out what the heck "T" stood for, you don't find a definition anywhere for it, you are just supposed to know it.
"T" stands for type, or Data type. sheesh....
ledtech3 20-Apr-12 17:11pm View
The Example above uses a Pipe, which is not used in VB.Net, but it is in C#.
I've been side tracked on a networking problem/Remote assistance , so I havent been back to that one yet.
I guess I just plain don't understand attributes then, I feel like i'm going in circels every time I try to look something up on MSDN or Technet.The words don't mean much without GOOD examples of what they are trying to say.
ledtech3 17-Apr-12 13:01pm View
According to a site called
they used:
Private Declare Sub CopyMemory Lib "kernel32" Alias _
"RtlMoveMemory" (ByVal Destination As Long, ByVal _
Source As Long, ByVal Length As Integer)
ledtech3 14-Apr-12 16:16pm View
The original code above only returned the first item found.
The code Listed below, the best I understand , iterates thru all of the Attribute flags and if 1 of them matches a number in out list then it returned.
The code works but is slow. Still looking for a bettter way. That code was derived from looking at the sample on the MSDN page.I'll have to rework my test case statement to see if i can just check against each number.
Thanks again for pointing me in the right direction.
ledtech3 8-Apr-12 22:51pm View
The problem was I didn't know what value it was supposed represent , string, array of string,or what ever.

After reading it again am I correct in understanding that the Value returned from the GetAttributes , if i do a bitwise operation using the returned value and the Values listed in the Table , If the result is 0 then that flag is not set, if the result is 1 then the flag is set , and that file has that attribute ?
ledtech3 8-Apr-12 21:33pm View
I have read the information there But, I’m trying to understand the string that is returned from that function. Something is not sinking in on the relation of the returned string and your listing for the number.

After I posted, I realized all I was doing in my code was just appending each returned character to a new line from the, System.IO.File.GetAttributes(filename).

So you are saying to decode the string that is returned you have to do a bitwise operation ?
ledtech3 6-Apr-12 0:27am View
Sorry I never Seen a Notice that you replyed to me. The Link is no longer valid.
Do you Still have the Problem?
ledtech3 29-Mar-12 10:05am View
Is there a Line length limit ?
You may try in the function Public Function MobileBooking
ByVal Pickuplocation As String, _
ByVal Droplocation As String, _
ByVal latitude As String, _

and so on.

Advertise | Privacy |
Web01 | 2.8.171020.1 | Last Updated 1 Jan 1900
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid