Lost Password?

Go Back   CodeCall Programming Forum > Software Development > Visual Basic Programming

Visual Basic Programming Discussion forum for Visual Basic, an event driven programming language and associated development environment from Microsoft for its COM programming model.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-16-2008, 04:04 AM
sakishrist's Avatar   
sakishrist sakishrist is offline
Learning Programmer
 
Join Date: Dec 2007
Location: Greece - Syros
Posts: 60
Rep Power: 3
sakishrist is on a distinguished road
Send a message via MSN to sakishrist Send a message via Skype™ to sakishrist
Lightbulb How to convert a structure from C

Hello!
I have this structure:
Code:
typedef struct _DISK_PERFORMANCE {
  LARGE_INTEGER BytesRead;
  LARGE_INTEGER BytesWritten;
  LARGE_INTEGER ReadTime;
  LARGE_INTEGER WriteTime;
  LARGE_INTEGER IdleTime;
  DWORD ReadCount;
  DWORD WriteCount;
  DWORD QueueDepth;
  DWORD SplitCount;
  LARGE_INTEGER QueryTime;
  DWORD StorageDeviceNumber;
  WCHAR StorageManagerName[8];
} DISK_PERFORMANCE, 
 *PDISK_PERFORMANCE;
It's from the msdn
I need to convert it to vb.net but I have two problems: First one, I'm not really sure about the data types ... is LARGE_INTEGER int64, and what is WCHAR? And second one, how should I use the StorageManagerName[8] in vb.net?
Thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 05-16-2008, 07:49 AM
v0id's Avatar   
v0id v0id is offline
Super Moderator
 
Join Date: Apr 2007
Location: Denmark
Posts: 2,445
Last Blog:
CherryPy(thon)
Rep Power: 27
v0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of light
Send a message via MSN to v0id
Default Re: How to convert a structure from C

I can't help you with the Visual Basic.NET-part, but I can answer some of your questions.

Quote:
Originally Posted by sakishrist
is LARGE_INTEGER int64, [...]
Yes.

Quote:
Originally Posted by sakishrist
and what is WCHAR?
It's a wide character. It can be used for special characters.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-16-2008, 11:30 AM
Xav's Avatar   
Xav Xav is offline
Code Warrior
 
Join Date: Mar 2008
Location: London, England
Posts: 5,263
Last Blog:
Web slideshow in JavaS...
Rep Power: 45
Xav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to behold
Send a message via MSN to Xav
Default Re: How to convert a structure from C

For the VB.NET part, just use a normal structure or class with the type Int64 or Long.
__________________
[TRUTH] TcM is the best moderator ever! [/TRUTH]
"Valid XHTML is like sex - everybody claims to have the same goal, but everybody has their own tricks and results vary wildly."
Mr. Xav | Website | Forums | Blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 05-17-2008, 10:25 AM
sakishrist's Avatar   
sakishrist sakishrist is offline
Learning Programmer
 
Join Date: Dec 2007
Location: Greece - Syros
Posts: 60
Rep Power: 3
sakishrist is on a distinguished road
Send a message via MSN to sakishrist Send a message via Skype™ to sakishrist
Default Re: How to convert a structure from C

OK, thanks, I got it working!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 05-17-2008, 11:01 AM
Xav's Avatar   
Xav Xav is offline
Code Warrior
 
Join Date: Mar 2008
Location: London, England
Posts: 5,263
Last Blog:
Web slideshow in JavaS...
Rep Power: 45
Xav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to behold
Send a message via MSN to Xav
Default Re: How to convert a structure from C

Great!
__________________
[TRUTH] TcM is the best moderator ever! [/TRUTH]
"Valid XHTML is like sex - everybody claims to have the same goal, but everybody has their own tricks and results vary wildly."
Mr. Xav | Website | Forums | Blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to convert your photoshop document to a CSS in less than 30 seconds clookid Photoshop Tutorials 17 06-04-2008 11:36 AM
Database tree structure functionality Sh_oK Database & Database Programming 0 03-05-2008 10:59 AM
convert frx report to excel file using visual foxpro 8 jov General Programming 0 11-13-2007 08:43 PM
Convert matlab code to C/C++ on Linux Kank C and C++ 2 10-11-2007 02:09 AM
Visual Studio 2003 convert System::String to char array karateboy02 Managed C++ 0 07-27-2007 09:00 AM


All times are GMT -5. The time now is 12:34 AM.

Contest Stats

John ........ 223.00000
dargueta ........ 168.00000
Xav ........ 164.00000
LogicKills ........ 20.00000
gaylo565 ........ 18.00000
WingedPanther ........ 15.00000
|pH| ........ 15.00000
Johnnyboy ........ 3.00000
navghost ........ 1.00000

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 67%

Ads