IUnknown_QueryService関数のエラーメッセージと解決方法

このQ&Aのポイント
  • 古い形でのIUnknown_QueryService関数の呼び出しにより、'IUnknown_QueryService': 識別子が見つかりませんでしたというエラーメッセージが表示されます。これは、Shlwapi.hにIUnknown_QueryServiceが含まれていないバージョンのMicrosoft Windowsの場合に発生します。
  • 解決方法として、この関数がShlwapi.hから直接呼び出される必要があります。具体的には、ordinal 176を使用してShlwapi.dllから直接呼び出す必要があります。
  • これにより、'IUnknown_QueryService': 識別子が見つかりませんでしたというエラーメッセージが解決し、IUnknown_QueryService関数を正しく呼び出すことができるようになります。
回答を見る
  • ベストアンサー

IUnknown_QueryService ?

IUnknown_QueryService(pUnkSite, SID_SWebBrowserApp,IID_IWebBrowser2, (void**)&m_pWebBrowser2);// IID_PPV_ARGS(&m_pWebBrowser2));  これを古い形に書き換えるとどうなるのでしょうか? 'IUnknown_QueryService': 識別子が見つかりませんでした とメッセージが出ています。 For those versions of Microsoft Windows that do not include IUnknown_QueryService in Shlwapi.h, this function must be called directly from Shlwapi.dll using ordinal 176. となっています。  よろしくお願いします。

質問者が選んだベストアンサー

  • ベストアンサー
  • kumatti1
  • ベストアンサー率60% (73/121)
回答No.1

> これを古い形 IServiceProvider::QueryService > 識別子が見つかりませんでした Shlwapi.h

uyama33
質問者

お礼

ありがとうございます。 Shlwapi.h が2005年のものでしたので入っていませんでした。(VS2005を使っています。) SDKの新しいものをダウンロードして、2010年のものを使ったら 認識してくれました。 これからもよそしくお願いします。

関連するQ&A

  • BHO-3

    いつもお世話になっています。 STDMETHODIMP CHelloWorldBHO::SetSite(IUnknown* pUnkSite) { HRESULT hr = S_OK; if (m_pSite != NULL){ m_pSite->Release(); m_pSite = NULL; } if (pUnkSite != NULL) { IHTMLDocument3 *pDocument3; HRESULT hr2 = pUnkSite->QueryInterface(IID_IHTMLDocument3, (void **)&pDocument3); if (SUCCEEDED(hr2)){ PutEventHandler(pDocument3); } ////////////////////////////// // IWebBrowser2 へのポインタをキャッシュします。 HRESULT hr = pUnkSite->QueryInterface(IID_IWebBrowser2, (void **)&m_spWebBrowser); if (SUCCEEDED(hr)) { // DWebBrowserEvents2 からのイベントをシンクに登録します。 hr = DispEventAdvise(m_spWebBrowser); if (SUCCEEDED(hr)) { m_fAdvised = TRUE; } } 上のコードの IHTMLDocument3 *pDocument3; HRESULT hr2 = pUnkSite->QueryInterface(IID_IHTMLDocument3, (void **)&pDocument3); if (SUCCEEDED(hr2)){ PutEventHandler(pDocument3); } ですが、 HRESULT hr2 = pUnkSite->QueryInterface(IID_IHTMLDocument3, (void **)&pDocument3); の部分で失敗します。 HRESULT hr = pUnkSite->QueryInterface(IID_IWebBrowser2, (void **)&m_spWebBrowser); if (SUCCEEDED(hr)) { // DWebBrowserEvents2 からのイベントをシンクに登録します。 hr = DispEventAdvise(m_spWebBrowser); if (SUCCEEDED(hr)) { m_fAdvised = TRUE; } } が、上手く動くのでまねをしたのですが上手く行きません。 すみませんが、アドバイスお願いします。

  • BHO のサンプルを拡張して、トラブル

    いつも、お世話になっています。 http://msdn.microsoft.com/ja-jp/library/bb250489(v=vs.85).aspx を参考にして、BHOのプログラムを始めてみました。 機能を追加しようとして、他のサイトを参考にして BOOL CHelloWorldBHO::PutElementData(IHTMLDocument3 *pDocument3) { BSTR bstrId, bstrHref, bstrText; IHTMLElement *pElement; IHTMLAnchorElement *pAnchorElement; bstrId = SysAllocString(L"sample"); pDocument3->getElementById(bstrId, &pElement); if (pElement == NULL) { SysFreeString(bstrId); return FALSE; } bstrText = SysAllocString(L"トップページへ戻ります"); pElement->put_innerText(bstrText); pElement->QueryInterface(IID_PPV_ARGS(&pAnchorElement)); bstrHref = SysAllocString(L"http://eternalwindows.jp/"); pAnchorElement->put_href(bstrHref); MessageBox(NULL, TEXT("エレメントのデータを変更しました。"), TEXT("OK"), MB_OK); SysFreeString(bstrText); SysFreeString(bstrHref); SysFreeString(bstrId); pAnchorElement->Release(); pElement->Release(); return TRUE; } を追加してみました。他にも3つの関数を追加しました。 コンパイルすると、 'IID_PPV_ARGS': 識別子が見つかりませんでした とのメッセージが出ます。 どのように対処すればよいのでしょうか? OSはWin7(64ビット) + VS2005 で作業しています。 よろしくご指導ください。

  • これらの文がうまく訳せなくて困っています。

    これらの文がうまく訳せなくて困っています。助けてください。よろしくお願いします。 Showing it diagrammatically(as a graph) makes it clear that it could not be called a universal franchise. The phrase beside it, ‘Ich gehe falten‘(I’m going to fold) instead of ‘Ich gehe wahlen’(I’m going to vote), proves that the single-list elections had nothing to do with elections in the usual sense of a real democracy. Even through it made a claim to represent the whole of Germany and affirmed democratic principles, this constitutional document immediately developed into an instrument for the construction of a Socialist partial state using political repression and the persecution of those with differing views. Article 6 was particularly striking in this respect as it characterized a ‘boycott campaign against democratic institutions and organizations’ as a crime.

  • 日本語訳をお願いします。

    至急こちらをお願いします。 The thought of havingto cook dinner at the end of a a long day is sometimes almost more than your tired parents can bear-even with the help of grocery stores,refrigerators,and microwave ovens.Imagine what it must have been like in he ancient village of Mehrgarh.Not only was there no fast food,there weren't even any pots or pans.For the village's first 1,500 years,vilkagers cooked their fond,using nothing more than hot stomes,baskets,and perhaps leather sacks.Every cook must have wished a hundred times for some kind of vessel that could be put directly over the fire,that could hold water better than a bitumen-coated basket,and that a rat couldn't chew through. About 5500 BCE,the villagers realized that a solutiom o the problem of cooking and food storage was right at their feet-the fine,silty mud called clay.They dug it out of its slippery deposits by the river with digging sticks,then pounded it to bits and dried it in the hot sun for a couple of days.Then they sifted it to remove any small rocks or leaves,kneaded it with water until it formed large balls,then covered the balls with a damp cloth.For several days,water seeped into the clay.Then it was finally ready to shape into a pot or a smalk human or animal figure.

  • [英語]()に入るものを教えて下さい><

    1. The tennis player tried his best to () his rival in the finals. (1) beat (2) hit (3) lose (4) win 2. The total () of money that I paid for these books was more than 200 dollars. (1) account (2) amount (3) figure (4) number 3. My bag full, so I couldn't make () for my sweater. (1) location (2) position (3) room (4) vacancy 4. May I have your (), please? I have some announcements to make. (1) attention (2) care (3) heating (4) intention 5. I'm sorry to have kept you waiting. It's my (); I should have called you. (1) advantage (2) concern (3) disappointment (4) fault 6. You sometimes say bad things behind your brother's (). Why don't you talk to him directly? (1) back (2) face (3) head (4) shadow 7. There are lots of silly TV programs in which people just talk (). (1) jokes (2) laughs (3) nonsense (4) wisdom 8. I'll () a simple map to the nearest station for you. (1) draw (2) paint (3) tell (4) write 9. Chris : Friday night was my date with Emily. Tom : How was it? Chris : It was terrible! I spilled my coffee all over her. Tom : () I'm sure she forgave you. Chris : I hope so. (1) Don't you regret having acted stupidly? (2) Don't worry about it  (3) It's too late (4) She must have got angry. 10. Sam : How about going to a soccer game with me next Sunday? Brenda : It's nice of you to ask me. () Sam : Why? Do you have other plans? Brenda : Actually, I'm not very interested in soccer. (1) But why don't you want to as me out? (2) But I'd rather not go.  (3) I'm always at your service. (4) Couldn't be happier! 11. Jane : Welcome back! How was your trip? Bob : () Everything went wrong! Jane : Really? Like what? Bob : First of all, the airline lost our luggage. (1) You wouldn't believe it. (2) I'm sure you enjoyed it.  (3) That sounds terrible. (4) You shouldn't believe it.

  • 和訳をお願いします。

    In the interim, special companies of the Royal Engineers augmented the regular level of harassment by firing a total of 3,500 gas drums and 900 gas shells into Lens by 15 August. The artillery neutralized 40 out of an estimated 102 German batteries in the area by zero hour, partly with the technique of predicted fire for the first time, using datum points and calibrated guns, which greatly improved the accuracy of the artillery. Troops were rotated through the reserve area to conduct training and rehearsals in preparation for the assault. These obvious preliminary actions to an attack did not go unnoticed by the Germans, which made it impossible to conceal the First Army's general intentions or even, as it turned out, the date of the assault. The best that could be done was to attempt to mislead the Germans with respect to time and place. To this end I Corps staged exercises with dummy tanks on 14 August, directly west of Lens. Opposing forces Canadian Corps commander Lieutenant-General Arthur Currie had three attacking divisions, one division in reserve and numerous support units under his command. German 6th Army commander General der Infanterie Otto von Below was responsible for the area between Lille and Cambrai. Hill 70, and the area surrounding it was defended by the ad hoc Gruppe Loos. The defending elements of the German 6th Army consisted of the 7th Division, 4th Guards Division, 185th Division, 11th Reserve Division and 220th Division. Assault on Hill 70 The plan to capture Hill 70 called for the 1st and 2nd Canadian Divisions to attack on a front of 4,000 yards (3,700 m). Their objective was to capture the main enemy defensive positions on the eastern or reverse slope of Hill 70. The objectives were marked off in depth by three stages. In the first stage, the assaulting troops would capture the German front-line trenches. The German second position on the crest of the hill during the second stage and the final stage, marked by the German third line, on the reverse side of the slope, some 1,500 yards (1,400 m) from the starting position.

  • 和訳が苦手なので,長文の和訳をお願いします。

    下の【語句】を参考にして和訳をお願いいたします。   Scientists often need to observe things that cannot be seen with the naked eye, either because they are too small or because they are concealed from view. There is a range of instruments and technologies that can be used to produce images of these small or hidden things.   The light microscope, first developed around 1600, uses lenses to produce a magnified image of small objects. In the late 1600s an Englishman, Robert Hooke, used a microscope to examine some cork and observed that it was made up of small units. He called these units “cells”. In 1939 the electron microscope was developed. It creates an image using electrons rather than light, allowing us to observe things that are far too small to be seen with a light microscope. “Scanning” electron microscopes, which produce three-dimensional images, were developed in the 1960s.   Other technologies, such as X-rays and ultrasound, produce images of the insides of objects. Like many scientific discoveries, the discovery of X-rays was an accident. In 1895 German physicist Wilhelm Roentgen, was experimenting with electrons in vacuum tubes. He noticed that this caused a fluorescent screen in another part of the laboratory to glow. When he put his hand between the tube and the screen, he saw the outlines of his bones projected onto the screen. He didn’t know what kind of radiation was causing this, so he used the term “X-rays”, because in science “X” represents an unknown. Atoms of heavier elements absorb X-rays whereas atoms of lighter elements do not. In the human body, calcium in the bones absorbs X-rays, but soft tissue such as muscle does not. So when X-rays pass through the body they can produce an image of the bones. Too much exposure to X-rays can cause radiation sickness, so X-ray technicians need to take special precautions. CAT(computerized axial tomography) scans use computers and X-rays to produce three-dimensional images. they examine the body “slice-by-slice” in a series of cross-sections, producing precise images. They are valuable in diagnosing diseased like cancer. Very high frequency sound waves are called “ultrasonic waves”. We can’t hear them, but bats and dolphins can. They send out ultrasonic signals and can tell from any echo whether something is ahead of them and how far away it is. Special spectacles using ultrasound have been made for blind people. Ultrasonic waves are used to detect tiny cracks in aircraft wings where microscopes can’t be used. And they are widely used in medicine. The waves are reflected from the boundaries between organs in the human body, producing pictures of the inside of the body. Ultrasonic waves are used to study embryos during pregnancy, because they are much safer than X-rays.   The ultimate study of small, hidden things is the study of the smallest particles, such as quarks, that make up all matter. This is done with huge machines called “particle accelerators”. Powerful magnets speed up particles to almost the speed of light. The high-speed particles collide with other particles, and the pieces left over from the collisions are studied with special detectors. The pieces can be as small as 10^(-15) meters※ and can’t be seen directly. It seems the smaller the thing being observed, the larger the machine needed. 【語句】 scanning electron microscope 「走査型電子顕微鏡」 Wilhelm Roentgen 「ウィルヘルム・レントゲン(1845-1923)」 radiation sickness 「放射線病」 CAT(computerized axial tomography)scan 「コンピュータ断層X線投影法」 CT scanともいう。  embryo 「胚(はい),胎児」 quark 「クオーク」  particle accelerator 「粒子加速器」 ※10^(-15) meters 「10のマイナス15乗メートル」 1000兆分の1メートル

  • 和訳が苦手なので,長文の和訳をお願いします。

    和訳が苦手なので,長文の和訳をお願いします。 下の【語句】を参考にして和訳をお願いいたします。   Scientists often need to observe things that cannot be seen with the naked eye, either because they are too small or because they are concealed from view. There is a range of instruments and technologies that can be used to produce images of these small or hidden things.   The light microscope, first developed around 1600, uses lenses to produce a magnified image of small objects. In the late 1600s an Englishman, Robert Hooke, used a microscope to examine some cork and observed that it was made up of small units. He called these units “cells”. In 1939 the electron microscope was developed. It creates an image using electrons rather than light, allowing us to observe things that are far too small to be seen with a light microscope. “Scanning” electron microscopes, which produce three-dimensional images, were developed in the 1960s.   Other technologies, such as X-rays and ultrasound, produce images of the insides of objects. Like many scientific discoveries, the discovery of X-rays was an accident. In 1895 German physicist Wilhelm Roentgen, was experimenting with electrons in vacuum tubes. He noticed that this caused a fluorescent screen in another part of the laboratory to glow. When he put his hand between the tube and the screen, he saw the outlines of his bones projected onto the screen. He didn’t know what kind of radiation was causing this, so he used the term “X-rays”, because in science “X” represents an unknown. Atoms of heavier elements absorb X-rays whereas atoms of lighter elements do not. In the human body, calcium in the bones absorbs X-rays, but soft tissue such as muscle does not. So when X-rays pass through the body they can produce an image of the bones. Too much exposure to X-rays can cause radiation sickness, so X-ray technicians need to take special precautions. CAT(computerized axial tomography) scans use computers and X-rays to produce three-dimensional images. they examine the body “slice-by-slice” in a series of cross-sections, producing precise images. They are valuable in diagnosing diseased like cancer. Very high frequency sound waves are called “ultrasonic waves”. We can’t hear them, but bats and dolphins can. They send out ultrasonic signals and can tell from any echo whether something is ahead of them and how far away it is. Special spectacles using ultrasound have been made for blind people. Ultrasonic waves are used to detect tiny cracks in aircraft wings where microscopes can’t be used. And they are widely used in medicine. The waves are reflected from the boundaries between organs in the human body, producing pictures of the inside of the body. Ultrasonic waves are used to study embryos during pregnancy, because they are much safer than X-rays.   The ultimate study of small, hidden things is the study of the smallest particles, such as quarks, that make up all matter. This is done with huge machines called “particle accelerators”. Powerful magnets speed up particles to almost the speed of light. The high-speed particles collide with other particles, and the pieces left over from the collisions are studied with special detectors. The pieces can be as small as 10^(-15) meters※ and can’t be seen directly. It seems the smaller the thing being observed, the larger the machine needed. 【語句】 scanning electron microscope 「走査型電子顕微鏡」 Wilhelm Roentgen 「ウィルヘルム・レントゲン(1845-1923)」 radiation sickness 「放射線病」 CAT(computerized axial tomography)scan 「コンピュータ断層X線投影法」 CT scanともいう。  embryo 「胚(はい),胎児」 quark 「クオーク」  particle accelerator 「粒子加速器」 ※10^(-15) meters 「10のマイナス15乗メートル」 1000兆分の1メートル

  • 海外メーカーへの質問に対する回答(英語)が分かりません

    こんにちは 米国のパソコン周辺機器メーカーにメールで質問したのですが彼らの回答の英語の一部が理解できません。 やり取りの概略は、そのメーカーのある新製品がいつ頃発売開始になるのか問い合わせたところ、まだ時間が掛かるので今ある既存の製品はどうかと勧められている、といった内容です。 今までに2往復された彼らとのメール全文と、理解できない英語を下記に掲載しますので分かる方がいらしたら是非教えてください。 最初の私の質問: Hello I am using Dell Axim x51v and Citizen mobile printer PD-22 and the printer can print from the PDA via IrDA successfully. Now I am considering to put ACT-BT5711U between the PDA and the printer so that the printer prints from the PDA via Bluetooth since IrDA require the PDA on the straight line to the printer, which is sometime difficult when on the go. Does ACT-BT5711U work in the above configuration? これに対する回答: BT5711U is a Bluetooth-to-Raw IR bridge, not Bluetooth-to-IrDA, so it won't work with Citizen mobile printer PD-22, because PD-22 supports only IrDA. However, we have new product called BT5712U which does support Bluetooth-to-IrDA, we are developping it and will release soon. You may consider this new product. Thanks. これに対する私の更なる質問: Please let me know if you have any idea when the new product BT5712U is released. これに対する回答(分からない英語はこの中にあります): Yet BT5712U product is not release due to other products are under priority. But your requirement is important to us and like to work with you, So can you provide feedback on following to serve better way. 1) Does Dell Axim x51v has bluetooth built in? Does it has SPP (serial Port Profile)? Normally SPP is common profile so must be there. 2) Your annual requirement for such a product? 3) I checked your printer spec: http://www.retrevo.com/search?q=Citizen+Systems+PD-22&rt=sp it does support IrDA and RS232 We have similar customer who is using our ACT-BT5711S with O'Neil MicroFlash 4T Thermal printer, It has RS232 port and talking directly to Bluetooth and it is working fine. This will skip IR conversion steps. You may like to test that one with your setup. You can order one and test. If not working fine we can refund back. You may need to pay all handling charges. 4) Actually, for BT5712U product, at present for OEM requirment we are giving off the self testing unit (two different product ACT-BT5701S-v2 + IR100SD) but if your requirement is single unit and direct than that can not be a good solution for you. Please, let me know does you need single unit or will have OEM requirement later? 5) Which IrDA protocol does this printer support, IrCOMM OR IrLPT? IF you need any technical info OR interface/installtion detail, be free to ask. To place order for BT5711S, You can directly contact our sales person Ms Sarojini Chandra on following address OR use URL (http://www.actisys.com/ACTISYSOrderForm.doc) to download order form and fax it. Waiting to hear from you 私がわからない英語: 1.上記の回答の中の 2) Your annual requirement for such a product? にある annual requirement とは具体的にどういう意味なのか? (1年間にどのくらいの頻度で使っているかということか。回答としては「毎日使っている」と書けばよいか。) 2.上記の回答の中の 4) で彼らが言っている意味が分かりません。特にOEM requirment、self testing unit の二つの言葉の意味が不明なため英文全文が分かりません。(もしあなたが将来この新製品をOEM製造販売するつもりならテスト機を貸し出すことは可能だが、単に1個のみを購入するだけならテスト機を貸し出すことは出来ない、という意味か?) この私の疑問点に何らかのアドバイスといただける方はよろしくお願いいたします。

  • 英文の和訳をお願いします。

    LONDON(AP)ーJust try sugar-coating this:the World Health Organiz ation says your daily sugar intake should be just 5 percent of your total caloriesーhalf of what the agency previously recommended,according to new draft guidelines published earlier this month. After a review of about 9000studies,WHO's expert panel says dropping sugar intake to that level will combat obesity and cavities.Tha t includes sugars added to foods and those present in honey,syrups and fruit juices,but not those occurring naturally in fruits. Amerivans and others in the West eat a lot more sugar than that.Their average sugar in take would have to drop by two-thirds to meet WHO's suggested limit. Many doctors ap plauded the U.N. agency's attempt to limit th e global sweet tooth. "The less sugar you're eating, the better," sai d Dr. Robert Lustig, a professor of pediatrics at the University of California and author of a book about the dangers of sugar. "If the su gar threshold is lowered, I think breakfast ce real is going to have a really hard time justif ying its existence," he said, referring to swee tened cereals often targeted to children. Lustig said WHO's new guidelines could alte r the food environment by forcing manufact urers to rethink how they're using sugar in p rocessed foods like bread, soups, pasta sau ces and even salad dressings. He called the amount of sugar in processed food an "abso lute, unmitigated disaster." WHO's expert group found high sugar consu mption is strongly linked to obesity and toot h decay. It noted that heavy people have a hi gher risk of chronic diseases, responsible fo r more than 60 percent of global deaths. De ntal care costs up to 10 percent of health bu dgets in Western countries and cause signifi cant problems in the developing world. WHO warned many of the sugars eaten toda y are hidden in processed foods, pointing ou t that one tablespoon of ketchup contains a bout one teaspoon of sugar . There is no universally agreed consensus o n how much sugar is too much. The American Heart Association advises lim iting sugar to about 8 percent of your diet, or six teaspoons a day for women and nine for men. A study led by the U.S. Centers for Dise ase Control and Prevention published last m onth found too much sugar can raise the ch ances of fatal heart problems. Researchers f ound the average American gets about 15 p ercent of their calories from sugar, similar to other Western nations.

専門家に質問してみよう