Find Jobs
Hire Freelancers

C++ COM Object Code (Very Small)

$30-100 USD

已取消
已发布超过 15 年前

$30-100 USD

货到付款
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.
项目 ID: 3252199

关于此项目

远程项目
活跃16 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作

关于客户

UNITED STATES的国旗
United States
4.9
71
付款方式已验证
会员自5月 24, 2006起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。