<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Patrice Lamarche - C++</title>
    <link>http://patricelamarche.net/</link>
    <description>Ce blog est moche. Je ne suis pas designer.</description>
    <language>fr-fr</language>
    <copyright>Patrice Lamarche</copyright>
    <lastBuildDate>Wed, 10 Sep 2008 06:18:30 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>patrice.lamarche@gmail.com</managingEditor>
    <webMaster>patrice.lamarche@gmail.com</webMaster>
    <item>
      <trackback:ping>http://patricelamarche.net/Trackback.aspx?guid=e2d8dce6-eebd-4864-bb96-85ad7af5d186</trackback:ping>
      <pingback:server>http://patricelamarche.net/pingback.aspx</pingback:server>
      <pingback:target>http://patricelamarche.net/PermaLink,guid,e2d8dce6-eebd-4864-bb96-85ad7af5d186.aspx</pingback:target>
      <dc:creator>Patrice Lamarche</dc:creator>
      <wfw:comment>http://patricelamarche.net/CommentView,guid,e2d8dce6-eebd-4864-bb96-85ad7af5d186.aspx</wfw:comment>
      <wfw:commentRss>http://patricelamarche.net/SyndicationService.asmx/GetEntryCommentsRss?guid=e2d8dce6-eebd-4864-bb96-85ad7af5d186</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Lorsque vous développez une application ou bibliothèque C++ en mode mixte (mêlant
code natif et code managé), il est recommandé de fournir un point d’entrée non managé
pour votre DLL. Si ce n’est pas le cas vous risquez de rencontrer ce genre de message
amical de la part de regsvr32 "Attempt to use MSIL code from this assembly during
native code initialization...": 
</p>
        <p>
          <a href="http://patricelamarche.net/images/WindowsLiveWriter/CPPFournirunpointdentrenonmanagdansuneDL_744A/clip_image002_2.jpg">
            <img height="336" alt="clip_image002" src="http://patricelamarche.net/images/WindowsLiveWriter/CPPFournirunpointdentrenonmanagdansuneDL_744A/clip_image002_thumb.jpg" width="489" border="0" />
          </a>
        </p>
        <p>
Pour ce faire, il suffit de sélectionner le fichier cpp contenant votre point d’entrée
(dans mon cas DllMain.cpp) et désélectionner l’option Compile with CLR afin que ce
fichier ne soit pas flaggé avec le /CLR lors de la compilation contrairement aux autres
fichiers cpp de votre bibliothèque : 
</p>
        <p>
          <a href="http://patricelamarche.net/images/WindowsLiveWriter/CPPFournirunpointdentrenonmanagdansuneDL_744A/clip_image004_2.jpg">
            <img height="414" alt="clip_image004" src="http://patricelamarche.net/images/WindowsLiveWriter/CPPFournirunpointdentrenonmanagdansuneDL_744A/clip_image004_thumb.jpg" width="592" border="0" />
          </a>
        </p>
        <p>
          <img height="1" src="http://feeds.feedburner.com/~r/Patrice/~4/388381228" width="1" />
        </p>
        <img width="0" height="0" src="http://patricelamarche.net/aggbug.ashx?id=e2d8dce6-eebd-4864-bb96-85ad7af5d186" />
      </body>
      <title>[CPP] Fournir un point d'entrée non managé dans une DLL mixte</title>
      <guid isPermaLink="false">http://patricelamarche.net/PermaLink,guid,e2d8dce6-eebd-4864-bb96-85ad7af5d186.aspx</guid>
      <link>http://patricelamarche.net/2008/09/10/CPPFournirUnPointDentr%c3%a9eNonManag%c3%a9DansUneDLLMixte.aspx</link>
      <pubDate>Wed, 10 Sep 2008 06:18:30 GMT</pubDate>
      <description>&lt;p&gt;
Lorsque vous développez une application ou bibliothèque C++ en mode mixte (mêlant
code natif et code managé), il est recommandé de fournir un point d’entrée non managé
pour votre DLL. Si ce n’est pas le cas vous risquez de rencontrer ce genre de message
amical de la part de regsvr32 "Attempt to use MSIL code from this assembly during
native code initialization...": 
&lt;p&gt;
&lt;a href="http://patricelamarche.net/images/WindowsLiveWriter/CPPFournirunpointdentrenonmanagdansuneDL_744A/clip_image002_2.jpg"&gt;&lt;img height="336" alt="clip_image002" src="http://patricelamarche.net/images/WindowsLiveWriter/CPPFournirunpointdentrenonmanagdansuneDL_744A/clip_image002_thumb.jpg" width="489" border="0"&gt;&lt;/a&gt; 
&lt;p&gt;
Pour ce faire, il suffit de sélectionner le fichier cpp contenant votre point d’entrée
(dans mon cas DllMain.cpp) et désélectionner l’option Compile with CLR afin que ce
fichier ne soit pas flaggé avec le /CLR lors de la compilation contrairement aux autres
fichiers cpp de votre bibliothèque : 
&lt;p&gt;
&lt;a href="http://patricelamarche.net/images/WindowsLiveWriter/CPPFournirunpointdentrenonmanagdansuneDL_744A/clip_image004_2.jpg"&gt;&lt;img height="414" alt="clip_image004" src="http://patricelamarche.net/images/WindowsLiveWriter/CPPFournirunpointdentrenonmanagdansuneDL_744A/clip_image004_thumb.jpg" width="592" border="0"&gt;&lt;/a&gt; 
&lt;p&gt;
&lt;img height="1" src="http://feeds.feedburner.com/~r/Patrice/~4/388381228" width="1"&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://patricelamarche.net/aggbug.ashx?id=e2d8dce6-eebd-4864-bb96-85ad7af5d186" /&gt;</description>
      <comments>http://patricelamarche.net/CommentView,guid,e2d8dce6-eebd-4864-bb96-85ad7af5d186.aspx</comments>
      <category>C++</category>
    </item>
  </channel>
</rss>