Welcome to Tech Support Forum home to more then 136,000 problems solved. Issues have included: Spyware, Malware, Virus Issues, Windows, Microsoft, Linux, Networking, Security, Hardware, and Gaming Getting your problem solved is as easy as:
1. Registering for a free account
2. Asking your question
3. Receiving an answer

Registered members:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* See fewer ads.
* And much more..

 



Want to know how to post a question? click here Having problems with spyware and pop-ups? First Steps
Go Back   Tech Support Forum > The IT Pro > Programming
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read


Programming A discussion forum for programs and programming used in tech-related businesses.

Reply
 
LinkBack Thread Tools
Old 06-10-2009, 09:05 AM   #1 (permalink)
Registered User
 
Join Date: Jul 2008
Location: Canada
Posts: 113
OS: XP Pro SP2;Vista Home Premium SP1


Send a message via AIM to darksteel88 Send a message via MSN to darksteel88
Converting string to hex in VB express

So I'm trying to read in a specific file type (.pkm), which is translating to ASCII code normally (expected). I want to convert that ASCII code into hex. However, every attempt I have tried has failed, I often got a message saying I could not convert it to type long.

Code:
Dim file As String
        Dim data1 As String

        file = "D:\Documents and Settings\owner\Desktop\Pokemon\7-10-08_10ANNIV_ENG_Lugia.pkm"

        FileOpen(1, file, OpenMode.Binary)

        Do While Not EOF(1)
            Input(1, data1)
            Console.WriteLine(data1)
        Loop

        Console.ReadLine()
The Do While Not loop is fairly useless because I confirmed that it is all read in as a single string, and it is two lines long. I tried putting Hex(data1) above the writeline but I get the cannot convert to long error. Any help is appreciated.
darksteel88 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Important Information
Join the #1 Tech Support Forum Today - It's Totally Free!

TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free.

Join TechSupportforum.com Today - Click Here

Old 06-13-2009, 08:16 PM   #2 (permalink)
As you wish
 
TJ Belfiore's Avatar
 
Join Date: Mar 2009
Location: 530
Posts: 3,496
OS: 7 x64, XP x32


Re: Converting string to hex in VB express

Ha, useful idea.

I've worked with PKM files back in Diamond days, it's very interesting to debug them and see what's actually there. Although, I've never tried it in hex, Good Luck!!
__________________
Signature by TJ Belfiore

TJ Belfiore is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 06-14-2009, 09:08 AM   #3 (permalink)
Registered User
 
Join Date: Jul 2008
Location: Canada
Posts: 113
OS: XP Pro SP2;Vista Home Premium SP1


Send a message via AIM to darksteel88 Send a message via MSN to darksteel88
Re: Converting string to hex in VB express

Haha glad to see I'm not the only one. Ya, I collect events and I'm pretty well known, and we check to see if they were hacked with pokesav or not.

I have a friend that made a program to search the hex, was simplistic, but it worked. He used Delphi though. Mine would be rather more complex, a friend of mine has a chart that tells what all the hex are. However, I still need to view the hex, and I'm not sure exactly how, which is why I'm here waiting for an answer.
darksteel88 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 06-14-2009, 01:58 PM   #4 (permalink)
As you wish
 
TJ Belfiore's Avatar
 
Join Date: Mar 2009
Location: 530
Posts: 3,496
OS: 7 x64, XP x32


Re: Converting string to hex in VB express

Hi -

Yes! I really loved that program that checked the legitimacy of a Pokemon, it was truly useful for EV training and IV breeding to check if they were fakes when trading. Pokesav is neat, but cheap.

If you're looking for a program that will convert your file into hex, you could always just try another program and ditch trying to actually make one (so you have more options, resources, tech support, etc).

I recommend this[1] because it's both free and cool. I'm NOT entirely sure if it will convert your file (.pkm) to hex though, I'll test that all out later, but for now.. give it a shot.

[1] http://www.hhdsoftware.com/Products/...itor-free.html

Regards.
__________________
Signature by TJ Belfiore

TJ Belfiore is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 06-14-2009, 11:44 PM   #5 (permalink)
Registered User
 
Join Date: Jul 2008
Location: Canada
Posts: 113
OS: XP Pro SP2;Vista Home Premium SP1


Send a message via AIM to darksteel88 Send a message via MSN to darksteel88
Re: Converting string to hex in VB express

Cool, I'll try tomorrow (as in when I wake up today).

Ya, it's more complicated than just stats though. It includes checking pal park data (if it actually came from a GBA cart), WC data (if the wonder card was not in the original game), etc. As I stated, my friend drew up a list of what all the hex values corresponded to. I could develop a program to search through and return values, and then determine if they are correct.

And the reason I want to use VB express is because it is the only one I am fluent with, and it will be complicated as well as a form.
darksteel88 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 06-14-2009, 11:48 PM   #6 (permalink)
As you wish
 
TJ Belfiore's Avatar
 
Join Date: Mar 2009
Location: 530
Posts: 3,496
OS: 7 x64, XP x32


Re: Converting string to hex in VB express

Yeah, I was thnking of making a PokeDex, a very very complex one for all 490 something Pokemon using VB.
__________________
Signature by TJ Belfiore

TJ Belfiore is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 06-16-2009, 07:38 AM   #7 (permalink)
Registered User
 
Join Date: Jul 2008
Location: Canada
Posts: 113
OS: XP Pro SP2;Vista Home Premium SP1


Send a message via AIM to darksteel88 Send a message via MSN to darksteel88
Re: Converting string to hex in VB express

All 493, but why when there are great online resources for things like that?
darksteel88 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 06-16-2009, 02:01 PM   #8 (permalink)
As you wish
 
TJ Belfiore's Avatar
 
Join Date: Mar 2009
Location: 530
Posts: 3,496
OS: 7 x64, XP x32


Re: Converting string to hex in VB express

What happens when they're offline? :)

And.. I'm bored.

So, did you solve your issue or..
__________________
Signature by TJ Belfiore

TJ Belfiore is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 06-23-2009, 08:22 PM   #9 (permalink)
Registered User
 
Join Date: Jul 2008
Location: Canada
Posts: 113
OS: XP Pro SP2;Vista Home Premium SP1


Send a message via AIM to darksteel88 Send a message via MSN to darksteel88
Re: Converting string to hex in VB express

Sorry, I've been a little busy with school for the last 2 weeks, just got off a few days ago.

Look, I already have Hex Editor Neo, and yes, it does work. But it doesn't cut it for what I want to do. I want it to compare certain strings to see if they are what they are supposed to do. It works as a VIEWER, but I can't program it to do other things.

What I need is an actual solution to read in the file using VB Express. I can get as far as to read it in as ASCII but not convert it.
darksteel88 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 06-24-2009, 07:25 PM   #10 (permalink)
As you wish
 
TJ Belfiore's Avatar
 
Join Date: Mar 2009
Location: 530
Posts: 3,496
OS: 7 x64, XP x32


Re: Converting string to hex in VB express

Ah, you should probably take this to VBForums (.com), since they're very experienced and will help you.
__________________
Signature by TJ Belfiore

TJ Belfiore is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 06-25-2009, 06:05 PM   #11 (permalink)
Registered User
 
Join Date: Jul 2008
Location: Canada
Posts: 113
OS: XP Pro SP2;Vista Home Premium SP1


Send a message via AIM to darksteel88 Send a message via MSN to darksteel88
Re: Converting string to hex in VB express

Actually, I did, and I did get someone to answer it. I haven't had a chance to try it, but I will and it looks like it will work.
darksteel88 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -7. The time now is 02:41 PM.



Copyright 2001 - 2009, Tech Support Forum
Home Tips Plus | Outdoor Basecamp | Automotive Support Forum

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85