Windows x64ç°å¢ã§32bit/64bit両ããã»ã¹ããå©ç¨å¯è½ãªDLLãã¤ãã
32bitããã»ã¹ã¨64bitããã»ã¹éã§éä¿¡ããæ段ã¯ããããããããããã
Interprocess Communication Between 32-bit and 64-bit Applications
ãã®ãã¡ã®ã²ã¨ã¤ã«ã32bitã®COMãµã¼ãã¼1ã¤ã§ã32bit/64bit両ããã»ã¹ããã®ã¢ã¯ã»ã¹ã«å¯¾å¿ã§ããã¨ãããã®ãããããããããããæ¢åã®DLLãCOMã§ã©ãããã¦ãããã¨ã«ããã対å¿ãããã¨ãã§ããã¨ãããã¦ãããè±èªãããªããæ¥æ¬èªã®è³æããªããã ãªãã ããæ¥æ¬ã«ç¥ããã¥ããããããããªããã»ããã¼ã¨ãè¡ãã°ç¥ãæ©ä¼ãããã®ããã
Microsoft 64-bit Computing overview
Process Interoperability
Designing 64-bit-Compatible Interfaces
Windowsã®32bit/64bité渡æã«ããã¦ãCOMã®ãã®ãã¯ããã¯ã¯ã¨ã¦ãéè¦ã«ãªã£ã¦ããã ããããã¶ãããªããRPC(Remote Procedure Call)ã®ã¡ã«ããºã ã使ãããããã ããRPCã®ãµã¼ãã¹ãæ¢ãã¡ããã¡ã
ã¾ã¨ã
ã»64bit Windowsã«ããã¦
- 32bit processã¯32bit DLLããã¼ãã§ãããã64bit DLLããã¼ãã§ããªãã
- 64bit processã¯64bit DLLããã¼ãã§ãããã32bit DLLããã¼ãã§ããªãã
- 32bit processã¨64bit processéã§RPCããµãã¼ãããã¦ããã(åããã·ã³å
ã,å¥ãã·ã³é)
- 32bit COM server processã¯32bit/64bit client processã¨éä¿¡ã§ããã
- 64bit COM server processã¯32bit/64bit client processã¨éä¿¡ã§ããã
å¾ã£ã¦ãæ¢åã®COMã§ãªã32bit DLLãCOM server processã§ã©ãããã64bit processãããå©ç¨å¯è½ã«ãããã¨ãã§ããã
ã»å¯è½ãªãªã³ã¯
- 32bitDLL <-(DynamicLink)-> 32bit proceess
- 64bitDLL <-(DynamicLink)-> 64bit proceess
- 32bitDLL <-(Link)-> 32bit COM server process <-(RPC)-> 32bit/64bit process
- 64bitDLL <-(Link)-> 64bit COM server process <-(RPC)-> 32bit/64bit process
ã»ã¤ã¾ã32bit/64bit COM server processã§ããã°32bit/64bitç°å¢ãã¹ã¦ã«å¯¾å¿ã§ããã
- Windows x86ä¸ã§32bitã¢ããª(ã¤ã¾ãWIN32)ãã使ã
- Windows x64ä¸ã§32bitã¢ããª(ã¤ã¾ãWOW64)ãã使ã
- Windows x64ä¸ã§64bitã¢ããª(ã¤ã¾ãWIN64)ãã使ã
- å¥ã®ãã·ã³ãã使ã
ãã¡ãªããã¯ãç¬ç«ããã»ã¹ã«ãªããã¨ã§ã¡ã¢ãªæ¶è²»ãå¢ããã¨ããRPCã«ããããã©ã¼ãã³ã¹ä½ä¸ã¨ããããã©ã¼ãã³ã¹ãåé¡ã«ãããªããã¤ãã£ãã§32bitçã¨64bitçã®ä¸¡æ¹ãä½ã£ã¦ããããã¤ã³ã¹ãã¼ã«ãã¦ãããäºã«ãªãããã¨ãã°JRE(Java Runtime Environment)ãªããã¯ãããªã£ã¦ããããã®è¾ºã¯ãããã©ã¼ãã³ã¹ãã¤ã³ã¹ãã¼ã«ããããããµãã¼ããããããçã®è¦ç´ ã®ãã¬ã¼ããªãã«ãªãã¨æãã
ãªããOSå´ã§ãµãã¼ãããã°ããã®ã«ãªã32bit DLLè³ç£ã®COMã«ããã©ããã§64bitããªã±ã¼ã·ã§ã³ããå©ç¨ããã¡ã«ããºã ãæ¢åã®DLLã®ããããã¡ã¤ã«ããããã®ã©ããã¼ã®COMãèªåçæããã¸ã§ãã¬ã¼ã¿ãä½ããããªæ°ããããvisual studioã®ãã©ã°ã¤ã³ã¨ãã¦ä½ãã¨ããç¡çããªï¼
COM serverã®EXEã®ã»ãã¯ãã¯ã©ã¤ã¢ã³ãã¨ã¯å¥ã®ç¬ç«ããããã»ã¹ã«ãªããproxy/stubçµç±ã§éä¿¡ãã(RPC)ãCOMãDLLã§ä½ãã¨ãã¯ã©ã¤ã¢ã³ãããã»ã¹ã®ä¸ã«ãã¼ãããã¦åããã§ãDLLã§ãã代çããã»ã¹(SurrogateProcess)ã使ãã°RPCã«ã§ãããããã
COMã®ç¥èã¯ãã¾ã æµ ãã§ãã