Find Jobs
Hire Freelancers

C++ COM Object Code (Very Small)

$30-100 USD

Cancelled
Posted over 15 years ago

$30-100 USD

Paid on delivery
This project is to fix the below functions with the missing code. Its only a few lines of code - a working program is not needed. ============================== void iTunesConnect() { CoInitialize(0); HRESULT hRes; hRes = ::CoCreateInstance(CLSID_iTunesApp, NULL, CLSCTX_LOCAL_SERVER, IID_IiTunes, (PVOID *)&iTunes); // NEEDED: Code needed here to disable COM "Server Busy" messages } void DoSomething() { IITSource *source; IITPlaylistCollection *playlists; int d; iTunes->get_LibrarySource(&source); source->get_Playlists(&playlists); playlists->get_Count((long*)&d); return d; } void iTunesDisconnect() { // NEEDED: Code needed here to fully disconnect the COM object iTunes->Release(); iTunes = NULL; return; } ====================== The code above sets up a COM connection with the iTunes program and performs functions on it. There are two problems: Occasionally the code will show a COM error message: "Server is Busy" if the DoSomething() function is called while iTunes is in use and (2) The iTunesDisconnect function does not fully work - even after the program is closed if the user tries to quit iTunes a message that "another program is connected" to iTunes is displayed. This project is for the lines of code needed below to make sure the "Server Busy" message does not display and for fully disconnecting the COM object. Please include any "#include" statements that would be needed. I am just looking for the code. This should be easy if you know what you are doing - I don't need a full program. I will plug your code in to the full program for testing. Let me know if you have any questions.
Project ID: 3252199

About the project

Remote project
Active 16 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs

About the client

Flag of UNITED STATES
United States
4.9
71
Payment method verified
Member since May 24, 2006

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.