Friday, April 27, 2007

Building the VI3 SDK .NET DLLs

So I've decided to start right at the very beginning. If you're going to build an app in .NET using the VI3 SDK, you need the DLL files with all the stub classes. And since the DLLs distributed with my MAC tool were from the VirtualCenter 2.0.0 version of the SDK, I've decided to rebuild them using the 2.0.1 version.

I should note at this point, that building these DLLs has gotten much easier since the original release. When you extract the SDK components you are supplied with a script that would build this DLL for you; however when you use the DLL generated from it you get stuck with a bug that makes it incredibly slow to create a VimService instance. This is all documented in a VMWare knowledge base article, along with how to work around it. If you go and read that article, you can see the instructions I had to follow to make the MAC-tool DLLs - all that stuff that's now listed as "Alternative 2: Step-by-Stem Instructions". But with the 2.0.1 release, that KB article has been updated with a patch that makes this procedure very easy.

So - to actually build these DLLs, you will need a few things.

  1. Visual Studio 2005. I have a license for the Professional edition, however the free Express editions will work just as well.
  2. The VI3 SDK. I recommend grabbing the documentation while you're there.
  3. The patch to automate building DLLs without performance problems. Scroll to the very bottom of that article to find the patch attached.
Install Visual Studio if you haven't already, and extract both the SDK and the patch. From this point on I'm going to assume that you've extracted the SDK to C:\Temp\SDK\ and the patch to C:\Temp\patch\. To make really sure that we're talking the same directories, in the C:\Temp\SDK\ folder you should find 2 more folders and 2 .wsdl files, and in the C:\Temp\patch\ folder there should be 8 files - mostly .txt and .cmd.

Next step is to open up a Visual Studio command prompt. Make sure it's a Visual Studio one and not just regular cmd.exe as the VS one has a lot more environment variables defined. You can find the shortcut somewhere in the Visual Studio program group. You'll know you got the right one if at the top when it starts it says "Setting environment for using Microsoft Visual Studio 2005 x86 tools." Then it's just a matter of typing a few commands.

CD \Temp\patch
patch201.cmd C:\Temp\SDK
CD \Temp\SDK\samples_2_0\DotNet
Build2005.cmd

When that last command finishes, you'll find a couple of brand new DLLs for you in the C:\Temp\SDK\samples_2_0\DotNet\ folder. You can copy them to wherever you like, and if you don't want the sample code it is safe at this point to delete both the SDK folder and the patch folder. The only things you need are VimService2005.dll and VimService2005.XmlSerializers.dll.

Or if you're lazy, I've put compiled versions up in a place where you can snag them from. If you have problems extracting that, go and get 7-Zip.

Now besides being a slightly newer version than my older DLLs, there is another significant difference with this version (besides file names). All of the objects in this version are in the VimApi namespace. So an object from my DLL named say VimService, in this new DLL will be called VimApi.VimService. The really easy way to make code written for the old DLL work is to just add this line to the top of every file.

Imports VimApi

After thats done, you can reference all the objects without having to type 'VimApi.' in front of everything. To port my VIClient.DLL to this new VimService2005, all I had to do was remove the old DLL reference, add a reference to VimService2005, and add the Imports line at the top.

16 comments:

aiyipianni said...

Aston Villa rode their luck at Hull City where an 88-minute own goal from Kamil Zayatte saw them leapfrog three points clear of Arsenal and into fourth place in the Premier League wow gold with a 1-0 win.

Villa had to survive Hull penalty wotlk gold appeals for a handball against Ashley Young in time added on, television replays showing that referee Steve Bennett wow gold correctly rejected the claims after consulting a linesman.

Bennett had been involved in controversy after just five minutes when American goalkeeper Brad Friedel looked to have handed Hull the initiative and threaten Villa's return to the Champions League qualifying wow gold zone.

Friedel spilled the ball under pressure from Nick Barmby and stand-in right-back Nigel Reo-Coker turned it into his own net as he attempted to wow gold clear.

But Bennett cut short celebrations at the KC Stadium -- and let Friedel off the hook -- when he ruled out the score for an wow wotlkapparent infringement by Barmby.

Zayatte's intervention from a Young cross bound for wow gold Gabriel Agbonlahor then saw Villa leapfrog Arsenal and draw level with Manchester United on 38 points -- seven adrift of leaders Liverpool and four wow gold behind Chelsea.

Stung by an on-pitch dressing down wow gold by manager Phil Brown at Manchester City last week, Hull showed five changes and a vastly improved performance.

Promoted Hull were looking for only their second win in 11 games while wow gold Villa arrived unbeaten in seven and it looked to be heading for a goalless draw when the home side suffered a cruel late blow.

aiyipianni said...

Premier League leaders Liverpool thrrew their "full support" world of warcraft gold behind Steven Gerrard after their captain was charged with assault on Tuesday following an incident at a local nightclub.

Gerrard, 28, and two other men were charged with assault occasioning bodily harm and affray, Merseyside police said.

They are scheduled to world of warcraft gold appear in court on January 23.

In the wake of the charges, Liverpool issued a wow power leveling statement on their official Web site.

"Steven has been an outstanding servant to Liverpool for the last ten years and the club will give him all the support he needs at this time," it read.

The offenses with which Gerrard have been charged carry a maximum penalty of five years in prison.

Three other men, who were also arrested, were world of warcraft gold released without charge pending further inquiries.

Gerrard was arrested cheap wow gold in the early hours of Monday morning and eventually charged after over 20 hours in police custody.

His wife Alex Curran was seen near the police station where world of warcraft gold he was held but drove off without talking to reporters.

Gerrard had been celebrating his side's 5-1 buy wow gold win over Newcastle on Sunday when the alleged altercation occurred.

He had scored two goals in the victory at St James' Park which left Liverpool top of the English Premier League and on course for their first English title in 18 years.

He was released on bail to appear in court on January 23 with John Doran, 29, and Ian Smith, 19, who were charged with the same offenses.

Gerrard, who has spent his entire career with Liverpool, world of warcraft gold is one of the most celebrated players in the club's history and renowned as a model professional.

In 2005 he lifted the European Cup -- Liverpool's fifth -- wow gold kaufen after a thrilling penalty shooting victory over AC Milan and turned down the advances of cash-rich Chelsea to stay with his local club.

The midfielder has also made 70 appearances for England, captaining his country on four occasions.

He was made an Member of the British Empire (MBE) last year and received an honorary fellowship from Liverpool's John Moores University.

Liverpool's next match is against Preston in the English FA Cup on Saturday, a game Gerrard was due to sit out because of suspension

buy wow gold said...

When the Wow Gold wolf finally found the wow gold cheap hole in the chimney he crawled cheap wow gold down and KERSPLASH right into that kettle of water and that was cheapest wow gold the end of his troubles with the big bad wolf.

game4power.
The next day the Buy Wow Goldlittle pig invited hisbuy gold wow mother over . She said "You see it is just as Cheapest wow goldI told you. The way to get along in the world is to do world of warcraft gold things as well as you can." Fortunately for that little pig, he buy cheap wow gold learned that lesson. And he just wow gold lived happily ever after!.

Gold Guide for World of Warcraft said...

good post :)

Wow Gold said...

Randy Run has the contacts to first-class pro gamers, who not only supply your daily dose of WoW gold, but also offer interesting level services like WoW powerleveling, Wow profession levelling and WoW PvP levelling.

Anonymous said...

Hi There I'd like to thank you for such a great made forum!
Just thought this would be a nice way to make my first post!

Sincerely,
Hilary Driscoll
if you're ever bored check out my site!
[url=http://www.partyopedia.com/articles/tea-party-supplies.html]tea Party Supplies[/url].

Anonymous said...

[url=http://www.kfarbair.com][img]http://www.kfarbair.com/_images/logo.png[/img][/url]

מלון [url=http://www.kfarbair.com]כפר בעיר[/url] - שלווה, [url=http://www.kfarbair.com/about.html]חדרים[/url] מרווחים, אינטימיות, [url=http://kfarbair.com/services.html]שקט[/url] . אנו מציעים שירותי אירוח מיוחדים כמו כן ישנו במקום שירות חדרים הכולל [url=http://www.kfarbair.com/eng/index.html]אחרוחות רומנטיות[/url] במחירים מפתיעים אשר מוגשות ישירות לחדרכם...

לפרטים נוספים אנא לפנות לאתרנו - [url=http://kfarbair.com]כפר בעיר[/url] [url=http://www.kfarbair.com/contact.html][img]http://www.kfarbair.com/_images/apixel.gif[/img][/url]

Anonymous said...

Hello everyone! Who knows where to upload the film Avatar?
I even bought the film Avatar for a SMS to http://rsskino.ru/kinofilm/avatar.html , the link was, but download fails, the system will boot quite strange cocoa something.
Men, advise where to normal as quickly download film avatar?

Anonymous said...

I just discovered the website who reviews about
many
home business ideas

If you want to know more here it is
home business ideas
www.home-businessreviews.com

Anonymous said...

I sell a boat-program which will help you to outwit auction and to win, initially the boat was created for the Scandinavian auction http://internet-aukcion.ru/ but now the program can work with similar auctions: gagen ru, vezetmne ru and with ten.
The program-boat stakes for you, i.e. for this purpose it is not necessary to sit constantly at the monitor. The boat can set time when it is necessary to stake, thus you as much as possible will lower expenses for rates, and as much as possible increase the chances of a victory.

The price of the program a boat for the Scandinavian auctions 20$

For the first 10 clients the price 15$

To all clients free updating and support.

Behind purchases I ask in icq: 588889590 Max.

Anonymous said...

[b]Set software LoveBots v 5.2[/b]

All for a mass mailing dating http://24lux.ru/

The script is written in php5

Features:

[i]registration, account activation
manual input captures, or the solution through antikapchu
filling data accounts:
- Gulf desired photo
- Инфы about yourself
- Diary
- Sexual preference[/i]

gulyalka on questionnaires spammer on lichku
- Randomization Posts: replacement of Russian letters in Latin analogues

optimized to work in a continuous loop
check-activation-filling-spam check ..

Updates and support free of charge.

Price per set 100 wmz

For the first 10 buyers price 70 wmz (your feedback on the software).

For shopping I ask in icq: 588889590 Max.

Scrin program:

[IMG]http://i066.radikal.ru/1002/9d/a7a68e8c96ee.jpg[/IMG]

[IMG]http://i054.radikal.ru/1002/19/9db76967c0e5.jpg[/IMG]

[IMG]http://s003.radikal.ru/i202/1002/24/20716e86512e.jpg[/IMG]

Flooding in the subject no! Write to feedback after the purchase.

Anonymous said...

Hello. My wife and I bought our house about 6 months ago. It was a foreclosure and we were able to get a great deal on it. We also took advantage of the 8K tax credit so that definitely helped. We did an extensive remodeling job and now I want to refinance to cut the term to a 20 or 15 year loan. Does anyone know any good sites for mortgage information? Thanks!

Mike

Anonymous said...

Hi everybody,

My name is Eva, I am 41 yrs old, living in Scottsdale, AZ.

I'd love to make good close friends here.

Thanks,
Eva.

Anonymous said...

Hey,

When ever I surf on web I never forget to visit this website[url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips].[/url]Plenty of useful information on virtual-rob.blogspot.com. Let me tell you one thing guys, some time we really forget to pay attention towards our health. Let me present you with one fact here. Research shows that almost 50% of all United States adults are either fat or weighty[url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips].[/url] Hence if you're one of these citizens, you're not alone. Its true that we all can't be like Brad Pitt, Angelina Jolie, Megan Fox, and have sexy and perfect six pack abs. Now the question is how you are planning to have quick weight loss? [url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips]Quick weight loss[/url] is really not as tough as you think. You need to improve some of you daily habbits to achive weight loss in short span of time.

About me: I am webmaster of [url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips]Quick weight loss tips[/url]. I am also health expert who can help you lose weight quickly. If you do not want to go under difficult training program than you may also try [url=http://www.weightrapidloss.com/acai-berry-for-quick-weight-loss]Acai Berry[/url] or [url=http://www.weightrapidloss.com/colon-cleanse-for-weight-loss]Colon Cleansing[/url] for fast weight loss.

Anonymous said...

Possibly the BEST topic I read all month?

Anonymous said...

Hi,

I begin on internet with a directory