ATL을 이용 VC++ 에서 VB로 Object넘기기

  1. LPDISPATCH 를 사용하여 Object를 넘기는 Interface 구현
    [id(1), helpstring(“method SetControlObject”)] HRESULT SetControlObject([in]LPDISPATCH ControObject);

  2. VB에서 Object를 넘겨 받는 부분 구현

    Private Sub DeviceLinker_SetControlObject(ByVal ControObject As Object)
             Dim tObject As Object
             Dim msim As ECUSIMULATORLib.Simulator
             Set tObject = ControObject
             Set MultiSim = ControObject
    End sub

    

VC에서 Object를 넘겨 주는 부분 구현

CWnd* p_Wnd=NULL;
CString m_fmt,s_Setting;
try
{
  HRESULT hr=NULL;
  sz=p_App->m_objArray.GetSize();
  for(i=0;i<sz;i++)
  {
     m_fmt=p_App->m_objArray[i];
     p_Wnd=(CWnd*)wnd_arr[i];
     if(!p_Wnd->CreateControl(m_fmt,"",WS_VISIBLE,rc,(CWnd*)&m_TAB,5000,NULL,FALSE,NULL))
     {
      m_str.Format("Could not place control\r\n\"%s\"",m_fmt);
      ::MessageBox (m_hWnd,m_str,"CreateControl Error!!",MB_OK);
      continue;
     }
     //CComPtr<ISupportErrorInfo> iErrInfo;
     ISupportErrorInfo* iErrInfo;
    IDeviceLinkerPtr pUI=NULL;
    pUI = p_Wnd->GetControlUnknown();
   if((NULL!=pUI) && (NULL!=p_App))//상속 되지 않은 것은 다른 종류의 OCX임
   {
      hr = pUI->SetControlObject((IDispatch*)p_App->p_SimMulti);
      if(hr!=S_OK)
      {
       hr = pUI->QueryInterface(IID_ISupportErrorInfo,(LPVOID*)&iErrInfo);
       if( iErrInfo->InterfaceSupportsErrorInfo(IID_IDeviceLinker) == S_OK)
       {
         IErrorInfo* iErrInfo;
         hr = GetErrorInfo(NULL,&iErrInfo);
         BSTR bstr = NULL;
         iErrInfo->GetDescription(&bstr);
         _bstr_t Bstr(bstr,false);
         m_str=    bstr;
         s_Setting.Format("SetControlObject()\r\n%s",m_str);
         MessageBox(s_Setting,m_fmt,MB_OK);
      }                                                                           }
     }
   if(i>0)
   {
     p_Wnd->ShowWindow(SW_HIDE);
   }
  }
 }
catch (_com_error &e)
{
::MessageBox(NULL,e.ErrorMessage(),m_fmt,MB_OK);
}

“ATL을 이용 VC++ 에서 VB로 Object넘기기”의 196개의 댓글

  1. Hello would you mind sharing which blog platform you’re using?
    I’m planning to start my own blog soon but I’m having a hard time making a decision between BlogEngine/Wordpress/B2evolution and Drupal.

    The reason I ask is because your design seems different then most blogs and I’m looking
    for something unique. P.S My apologies for getting off-topic but
    I had to ask!

  2. Exceptional post but I was wondering if you could write a litte more on this subject?
    I’d be very thankful if you could elaborate a little bit more.
    Appreciate it!

  3. Hey there I am so excited I found your webpage, I really found you by error,
    while I was looking on Yahoo for something else, Nonetheless I am
    here now and would just like to say many thanks for a incredible post
    and a all round exciting blog (I also love the theme/design),
    I don’t have time to go through it all at the moment
    but I have book-marked it and also added your RSS feeds, so when I have time I will be back to read a great deal more, Please do
    keep up the awesome job.

  4. I simply want to tell you that I’m beginner to blogging and actually loved your website. Probably I’m planning to bookmark your website . You definitely come with very good articles and reviews. Appreciate it for sharing your web page.

  5. Hello just wanted to give you a quick heads up. The text in your content seem to be running off the screen in Internet explorer. I’m not sure if this is a formatting issue or something to do with internet browser compatibility but I figured I’d post to let you know. The design and style look great though! Hope you get the issue fixed soon. Many thanks

  6. I picture this may well be various upon the written content material? in spite of this I nonetheless consider that it usually is appropriate for just about any form of topic subject matter, as a result of it could continuously be pleasurable to resolve a heat and pleasant face or possibly listen a voice whilst initial landing.

  7. Youre so cool! I do not mean Ive read anything like this before. So nice to find someone with some initial ideas on this subject. realy thank you for starting this up. this internet site is something that is required on the internet, somebody with a little originality. useful work for bringing something new to the internet!

  8. Can I simply say what an alleviation to locate somebody that actually recognizes what theyre talking about on the net. You certainly understand how to bring a concern to light as well as make it essential. Even more people need to read this and recognize this side of the tale. I cant think youre not much more prominent because you certainly have the present.

  9. I?d have to consult you right here. Which is not something I usually do! I delight in reading a message that will certainly make people think. Additionally, thanks for allowing me to comment!

  10. I was extremely delighted to find this web-site. I wished to thanks for your time for this remarkable read!! I definitely appreciating every little bit of it as well as I have you bookmarked to take a look at new stuff you blog post.

  11. The next time I review a blog, I hope that it doesn’t dissatisfy me as much as this one. I mean, I recognize it was my choice to review, but I actually believed youd have something intriguing to claim. All I hear is a bunch of whimpering about something that you might repair if you werent as well hectic trying to find focus.

  12. I was really happy to find this web-site. I wanted to many thanks for your time for this remarkable read!! I definitely delighting in every little bit of it and I have you bookmarked to have a look at new stuff you article.

  13. Nice message. I discover something a lot more tough on different blogs day-to-day. It will certainly constantly be promoting to read content from various other authors as well as practice a something from their store. I?d like to use some with the content on my blog whether you don?t mind. Natually I?ll give you a link on your internet blog. Many thanks for sharing.

  14. After looking at a number of the blog posts on your website, I truly appreciate your way of blogging. I book-marked it to my bookmark webpage list and will be checking back soon. Take a look at my web site as well and tell me how you feel.

  15. There are definitely a lot of details like that to take into consideration. That is a fantastic indicate bring up. I offer the ideas over as general motivation however clearly there are concerns like the one you bring up where the most vital thing will be operating in truthful good faith. I don?t understand if finest methods have actually emerged around things like that, yet I make sure that your job is plainly determined as an up for grabs. Both children as well as girls really feel the effect of just a moment?s pleasure, for the remainder of their lives.

  16. 핑백: Kimber guns in stock

  17. I?m satisfied, I should state. Actually seldom do I experience a blog site that?s both enlightening and also entertaining, and let me tell you, you have struck the nail on the head. Your concept is exceptional; the concern is something that insufficient people are speaking wisely around. I am really happy that I stumbled across this in my look for something relating to this.

  18. After research study a few of the post on your web site now, as well as I really like your method of blog writing. I bookmarked it to my book mark site listing and also will be examining back soon. Pls look into my website as well and also let me know what you assume.

  19. Thank you so much for giving everyone remarkably splendid possiblity to check tips from this website. It can be very awesome and also packed with a great time for me personally and my office co-workers to search the blog at least thrice a week to read through the fresh things you have. And of course, I’m at all times astounded concerning the exceptional techniques you give. Certain 1 facts in this posting are in truth the most beneficial we’ve ever had.

  20. Thanks so much for providing individuals with an extremely breathtaking possiblity to read critical reviews from this web site. It really is so cool plus stuffed with a lot of fun for me and my office acquaintances to search your website more than three times every week to find out the fresh guides you have. And definitely, I’m always fascinated considering the superb concepts you give. Some 3 areas on this page are without a doubt the most beneficial we’ve ever had.

  21. I want to convey my love for your kindness in support of visitors who actually need help with this particular subject. Your real commitment to getting the message throughout had been extremely important and have consistently empowered employees just like me to get to their targets. The helpful guide entails a lot a person like me and still more to my colleagues. Best wishes; from each one of us.

  22. Thanks so much for providing individuals with an extremely wonderful opportunity to read articles and blog posts from here. It is always so nice plus packed with amusement for me and my office colleagues to visit your website minimum three times per week to find out the latest secrets you have. And indeed, we’re always fascinated with the eye-popping creative ideas you give. Certain 2 ideas in this article are undeniably the finest we’ve ever had.

  23. I enjoy you because of your entire work on this web page. Kim really likes getting into internet research and it’s easy to understand why. We all learn all regarding the compelling ways you create vital solutions via the web site and welcome response from the others on the topic while our favorite daughter is certainly studying so much. Take pleasure in the remaining portion of the new year. You have been carrying out a good job.

  24. My spouse and i have been very peaceful Emmanuel managed to do his inquiry through the ideas he grabbed while using the weblog. It is now and again perplexing to just possibly be giving freely helpful tips that many some other people may have been selling. So we understand we have got you to give thanks to for that. These illustrations you have made, the easy site navigation, the relationships your site help foster – it’s got mostly sensational, and it’s really aiding our son in addition to our family feel that that idea is entertaining, and that’s quite important. Thanks for all the pieces!

  25. I wanted to put you a tiny remark to finally thank you very much over again with the breathtaking concepts you’ve featured on this site. It has been simply unbelievably generous of people like you to make extensively what exactly a few people could have sold as an electronic book to get some dough on their own, particularly seeing that you could possibly have done it if you ever decided. These good ideas in addition acted to become easy way to be certain that other people online have the same dream just as my personal own to understand somewhat more with regards to this matter. I’m sure there are a lot more pleasurable occasions in the future for individuals that find out your blog post.

  26. Thanks for your whole work on this blog. Kim loves going through research and it’s really obvious why. Almost all know all relating to the powerful tactic you offer informative tips via the blog and as well as foster response from some other people on the matter plus our own simple princess is without question learning a great deal. Take pleasure in the rest of the new year. You’re carrying out a stunning job.

  27. I in addition to my buddies were found to be examining the excellent ideas located on your website and so suddenly developed an awful feeling I never expressed respect to the site owner for them. All of the men had been for this reason warmed to read them and have in effect truly been using those things. I appreciate you for really being quite kind as well as for utilizing such quality subject areas millions of individuals are really needing to understand about. Our own honest apologies for not saying thanks to sooner.

  28. My spouse and i ended up being absolutely more than happy when Ervin could finish off his investigation from the precious recommendations he received through your site. It is now and again perplexing to just continually be giving away secrets that other people may have been making money from. And we all do understand we need the website owner to give thanks to for this. Those explanations you made, the simple web site navigation, the friendships you will aid to instill – it is all remarkable, and it’s facilitating our son in addition to us feel that this subject matter is pleasurable, and that is especially pressing. Thanks for all the pieces!

  29. I would like to show some thanks to the writer just for rescuing me from such a challenge. After exploring throughout the online world and finding methods that were not productive, I believed my life was done. Living without the strategies to the issues you’ve fixed through your good website is a serious case, as well as those that might have badly affected my career if I had not noticed your web site. Your own personal know-how and kindness in taking care of all areas was crucial. I’m not sure what I would’ve done if I had not come across such a point like this. I’m able to at this point look ahead to my future. Thanks for your time so much for the specialized and results-oriented guide. I will not be reluctant to recommend your web sites to any person who ought to have assistance on this issue.

  30. I’m just writing to let you understand of the useful discovery my cousin’s daughter went through viewing your web site. She learned too many pieces, with the inclusion of how it is like to have a very effective helping mood to make other folks really easily completely grasp chosen problematic topics. You truly did more than our expectations. Thank you for giving those warm and friendly, trustworthy, educational as well as unique thoughts on the topic to Mary.

  31. I must voice my love for your kind-heartedness giving support to individuals who need assistance with in this content. Your special dedication to passing the message all through ended up being rather productive and have usually permitted workers like me to arrive at their endeavors. Your own warm and helpful information signifies much a person like me and extremely more to my peers. Many thanks; from all of us.

  32. After study a few of the article on your website currently, as well as I absolutely like your way of blogging. I bookmarked it to my book mark web site listing and will certainly be checking back soon. Pls have a look at my web site as well and let me know what you think.

  33. I intended to send you one little bit of remark to say thanks a lot once again with the unique tips you have documented here. It’s certainly shockingly open-handed of people like you to deliver unreservedly what a lot of folks would’ve supplied as an electronic book to help make some profit on their own, most importantly given that you could possibly have tried it if you ever desired. These advice as well acted to provide a good way to be sure that other people online have similar passion just as my very own to find out somewhat more on the topic of this issue. I am certain there are many more pleasurable instances ahead for folks who go through your blog post.

  34. I want to show thanks to the writer just for bailing me out of this particular problem. Because of researching through the search engines and finding recommendations that were not powerful, I thought my entire life was well over. Living devoid of the strategies to the problems you have solved by means of your short article is a crucial case, as well as the kind that could have adversely affected my entire career if I had not encountered your website. Your personal talents and kindness in maneuvering all the pieces was helpful. I’m not sure what I would’ve done if I hadn’t encountered such a stuff like this. I can also at this point look forward to my future. Thanks so much for this impressive and amazing guide. I will not be reluctant to recommend your site to any person who ought to have guidelines on this situation.

  35. I just wanted to write down a brief word to say thanks to you for some of the amazing guides you are showing on this site. My incredibly long internet look up has finally been paid with wonderful suggestions to exchange with my great friends. I would admit that many of us site visitors actually are really fortunate to dwell in a useful site with very many lovely individuals with interesting concepts. I feel very much blessed to have used the webpages and look forward to really more fun times reading here. Thanks once again for all the details.

  36. Needed to draft you that little bit of note so as to say thanks once again about the spectacular things you have contributed above. It is really generous with people like you giving easily what exactly many individuals might have advertised as an e book in making some money for their own end, principally since you could have done it if you ever considered necessary. Those solutions also served to be a good way to understand that some people have similar dreams the same as my personal own to grasp many more related to this problem. I think there are millions of more pleasurable instances ahead for individuals who see your blog.

  37. I simply desired to thank you so much once again. I am not sure what I would’ve handled in the absence of the entire solutions shown by you over such a area of interest. It has been a very fearsome condition for me personally, but coming across your well-written avenue you solved that forced me to jump for joy. I’m grateful for the assistance and in addition hope that you know what a great job you were doing educating many people through a blog. Probably you’ve never come across any of us.

  38. I was really happy to discover this web-site. I intended to many thanks for your time for this fantastic read!! I absolutely appreciating every bit of it as well as I have you bookmarked to take a look at new things you article.

  39. I want to express some appreciation to this writer just for rescuing me from such a circumstance. As a result of surfing throughout the internet and seeing recommendations which were not pleasant, I figured my life was over. Existing minus the approaches to the difficulties you’ve resolved all through your main article is a critical case, and ones that could have adversely affected my career if I had not discovered your site. Your own personal understanding and kindness in touching everything was vital. I’m not sure what I would have done if I hadn’t come upon such a subject like this. I can also at this moment relish my future. Thanks for your time so much for the reliable and result oriented guide. I will not hesitate to suggest your site to any person who needs and wants counselling on this situation.

  40. My wife and i ended up being really thankful Emmanuel could conclude his studies from the precious recommendations he made while using the weblog. It’s not at all simplistic to just be releasing information and facts that a number of people may have been trying to sell. We recognize we’ve got you to give thanks to for this. The type of explanations you made, the straightforward website menu, the friendships you can help promote – it is all fantastic, and it is letting our son and our family believe that the issue is excellent, which is certainly especially serious. Thanks for all!

  41. I in addition to my buddies were reading the nice information from your site and then immediately got an awful feeling I never thanked you for those strategies. My young boys are already for this reason passionate to see them and have in truth been taking pleasure in them. I appreciate you for truly being quite helpful and also for obtaining this kind of awesome areas most people are really desperate to discover. My very own sincere apologies for not expressing gratitude to earlier.

  42. I would like to express some appreciation to the writer just for bailing me out of this instance. Right after surfing through the search engines and finding tips which were not powerful, I assumed my life was done. Living devoid of the answers to the difficulties you have solved as a result of your entire post is a crucial case, and ones which might have badly damaged my career if I had not come across the blog. Your main training and kindness in taking care of every part was vital. I don’t know what I would have done if I had not come across such a subject like this. I can at this time relish my future. Thanks very much for this expert and amazing help. I will not think twice to endorse your blog post to anybody who requires direction on this subject.

  43. Thank you so much for providing individuals with a very wonderful possiblity to read from this site. It is always very awesome and also stuffed with amusement for me and my office fellow workers to visit your site more than 3 times per week to find out the latest stuff you have. And lastly, I am at all times contented considering the very good information served by you. Selected two facts in this posting are absolutely the most impressive I’ve ever had.

  44. I want to express thanks to you for bailing me out of this particular situation. Right after scouting through the search engines and seeing opinions that were not helpful, I assumed my life was gone. Existing minus the strategies to the difficulties you have solved as a result of your good write-up is a serious case, as well as ones which might have in a negative way damaged my career if I hadn’t discovered your web page. Your own personal ability and kindness in touching all the details was vital. I’m not sure what I would’ve done if I had not discovered such a subject like this. It’s possible to at this time look ahead to my future. Thanks for your time so much for your impressive and amazing guide. I will not be reluctant to endorse your web page to anyone who needs to have counselling on this subject.

  45. I’m writing to let you understand what a magnificent encounter my friend’s princess obtained reading your webblog. She even learned several details, which included what it’s like to have an amazing helping nature to get folks really easily have an understanding of various specialized subject areas. You really did more than visitors’ expectations. Thank you for supplying the informative, trusted, educational as well as cool tips on the topic to Lizeth.

  46. Thank you so much for giving everyone an extraordinarily brilliant chance to read critical reviews from this web site. It is always so beneficial and as well , stuffed with a lot of fun for me personally and my office co-workers to search your blog the equivalent of three times in one week to see the new things you will have. Not to mention, I am just at all times fascinated for the fabulous creative ideas you serve. Some 4 areas in this post are unquestionably the most effective I have had.

  47. Can I simply claim what a relief to find a person who actually recognizes what theyre discussing on the internet. You definitely understand how to bring a concern to light as well as make it essential. More people require to read this and also recognize this side of the story. I angle believe youre not a lot more preferred since you certainly have the present.

  48. I simply want to tell you that I am just all new to blogs and truly enjoyed your web blog. Likely I’m likely to bookmark your blog . You absolutely come with superb stories. Thanks for sharing your blog.

  49. I just want to say I am just beginner to blogging and truly savored your web page. Most likely I’m planning to bookmark your blog post . You amazingly come with tremendous stories. Bless you for revealing your blog.

  50. An interesting dialogue is value comment. I believe that you need to write extra on this subject, it might not be a taboo subject however generally people are not sufficient to speak on such topics. To the next. Cheers

  51. Thanks for sharing superb informations. Your web site is very cool. I’m impressed by the details that you’ve on this blog. It reveals how nicely you understand this subject. Bookmarked this web page, will come back for extra articles. You, my friend, ROCK! I found simply the information I already searched all over the place and just could not come across. What an ideal site.

  52. Hello There. I found your weblog the use of msn. That is a really smartly written article. I’ll make sure to bookmark it and come back to read extra of your helpful info. Thank you for the post. I’ll definitely return.

  53. I’m extremely impressed with your writing skills as well as with the layout on your weblog. Is this a paid theme or did you customize it yourself? Anyway keep up the excellent quality writing, it’s rare to see a great blog like this one these days..

  54. I simply want to tell you that I’m very new to blogs and definitely enjoyed this blog. More than likely I’m going to bookmark your website . You absolutely come with excellent stories. Regards for revealing your web page.

  55. With havin so much written content do you ever run into any problems of plagorism or copyright violation? My website has a lot of completely unique content I’ve either written myself or outsourced but it looks like a lot of it is popping it up all over the internet without my authorization. Do you know any techniques to help protect against content from being stolen? I’d really appreciate it.

  56. In the great scheme of things you actually secure an A just for hard work. Where you lost us was first on your particulars. You know, it is said, the devil is in the details… And that could not be much more accurate at this point. Having said that, permit me reveal to you just what did do the job. Your authoring is definitely extremely powerful which is possibly the reason why I am taking an effort in order to opine. I do not really make it a regular habit of doing that. Secondly, whilst I can see a leaps in reasoning you make, I am not necessarily sure of exactly how you appear to unite your points which inturn produce the actual conclusion. For right now I shall subscribe to your point but wish in the near future you connect the facts better.

  57. I am really impressed together with your writing talents as well as with the format for your weblog. Is this a paid topic or did you customize it yourself? Anyway keep up the excellent high quality writing, it’s rare to see a nice blog like this one today..

  58. Do you have a spam issue on this site; I also am a blogger, and I was curious about your situation; we have created some nice methods and we are looking to trade strategies with others, please shoot me an e-mail if interested.

  59. Aw, i thought this was a very good post. In thought I must set up writing like that additionally – taking time and actual effort to generate a excellent article… but so what can I say… I procrastinate alot and also by no means often get something carried out.

  60. An intriguing discussion is worth comment. There’s no doubt that that you need to write more on this subject matter, it might not be a taboo subject but generally people don’t discuss these subjects. To the next! Best wishes.

  61. You are so cool! I do not suppose I have read through something like that before. So nice to discover someone with genuine thoughts on this subject matter. Seriously.. thank you for starting this up. This web site is something that is needed on the web, someone with a bit of originality.

  62. Can I just say what a comfort to find a person that genuinely understands what they’re talking about on the net. You certainly understand how to bring an issue to light and make it important. More and more people really need to read this and understand this side of the story. I can’t believe you aren’t more popular since you certainly possess the gift.

  63. Hey,I quite like looking at the post submit, I needed to write a bit remark to aid you and desire that you simply excellent continuationAll the best for the writing a blog endeavours.

  64. You are so interesting! I do not believe I’ve read a single thing like that before. So good to discover another person with genuine thoughts on this subject matter. Seriously.. thank you for starting this up. This website is something that is required on the web, someone with some originality.

  65. Thanks for any other great article. Where else may anybody get that type of information in such a perfect manner of writing? I’ve a presentation subsequent week, and I’m on the look for such info.

  66. certainly like your website but you have to check the spelling on quite a few of your posts. Several of them are rife with spelling issues and I in finding it very bothersome to tell the reality on the other hand I¡¦ll certainly come back again.

  67. Wow! This could be one particular of the most helpful blogs We’ve ever arrive across on this subject. Basically Wonderful. I am also a specialist in this topic therefore I can understand your hard work.

댓글 남기기