Using VB6 to write sketches

Hey, I am wondering whether it'd be possible to use VB6 to burn "sketches" to the Arduino, much like the IDE does?

The reason being is I wish to try keep my code hidden from the general public, so if I could somehow embed the sketch into a VB app, then use avrdude through VB to burn the Arduino was my way of thinking.

Possible or not? Any pointers or something I could try get started with?

Cheers,
Dan

How would involving Visual Basic keep the sketch hidden from the public?

Because the "sketch" could be embedded in the application itself. In order to get it back, you'd either need to intercept the datastream between VB and the Arduino, or decompile the program. Both are not something a "normal" user would be bale to do.

Intercepting the code during the upload is absolutely trivial, particularly for anyone who would know what to do with the .hex file in the first place. You're best off just distributing the .hex and whatever batch files you need to instruct avrdude to upload it, or start thinking about implementing your own secure bootloader.

Hey, I am wondering whether it'd be possible to use VB6 to burn "sketches" to the Arduino, much like the IDE does?

Yes.

Possible or not? Any pointers or something I could try get started with?

In a previous job, we had problems with thieves so, unfortunately, I have experience trying to protect programs and data. I warn you now, what you want to do is (somewhat) a fool's errand. A truly determined person will be able defeat whatever locks you put in place.

So, let's get started...

The reason being is I wish to try keep my code

How valuable is this code? Is it expensive for a customer to purchase? Does it provide a high value to the customer?

hidden from the general public

Who is this "general public"? Is your code available for download on public facing website? Is your code only available to paying customers?

so if I could somehow embed the sketch into a VB app

You can but that will only defeat the lazy unmotivated folks. While extent's attack vector is simple there is one even simpler: Notepad. After loading your program in Notepad, simply scanning from top to bottom will reveal the telltale signs of an Intel HEX file. A copy-and-paste is then used to clone the data to another file.

its quite possible, their is software to embed files into a compiled vb6 program.. Planet-source-code.com had a example years ago and still might.. as for the other part you could use the shell() call to run avr dude..
it might be slightly more secure to encrypt the hex, so one would have a smaller window to get the hex file..
but yet anything is hackable its just how far are they willing to go...

does vb6 apps run under windows 7, or vista? you may want to take a crack at realbasic, its a clone of vb that compiles binaries for windows, linux, and os x. and can run from the same source in many cases...
... those where the days...
I stopped mobile device programming for windows hardware after using vb express 3 and finding bugs in every control
then
I stopped programming for windows when they started using vb.net
then
I stopped using windows when they brought out vista