SlideShare a Scribd company logo
1 of 60
Compact Framework Interop Douglas Boling President Boling Consulting Inc. [email_address]
About Me ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Integration Imperative Web Applications Client Partner Partner Credit  info Ad-hoc Screen scrape Email FAX B2C website HTML
Integration Imperative Screen Scrape Client Website HTML
Windows Embedded Platforms Windows XP Embedded The most complete embedded platform enabling advanced devices by delivering the power of Windows in componentized form Windows CE  Windows CE integrates reliable real time capabilities with advanced Windows technologies to rapidly build a wide range of innovative, small-footprint devices
.NET on Embedded Devices ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],.NET Compact Framework
Get the Latest Stuff! ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
CF Similarities ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
CF Similarities ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
CF Difference Strategy ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
CF Differences ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
CF Differences ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Other Changes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
.NET CF Size ,[object Object],[object Object],[object Object],[object Object]
.NET Framework System.Web System.Windows.Forms System.Drawing System.XML System.Data System ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Security Session State Configuration Cache SQL Client SQL ServerCE Design ADO.NET IO Net Collections Security Reflection Resources Text Globalization Configuration Service Process Diagnostics Threading ,[object Object],[object Object],[object Object],[object Object],Design Drawing 2D Imaging XML Document Xslt/XPath Serialization Reader/Writers Printing Text Component Model
.NET Compact Framework System.Web System.Windows.Forms System.Drawing System.XML System.Data System ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Security Session State Configuration Cache SQL Client SQL ServerCE Design ADO.NET IO Net Collections Security Reflection Resources Text Globalization Configuration Service Process Diagnostics Threading ,[object Object],[object Object],[object Object],[object Object],Design Drawing 2D Imaging XML Document Xslt/XPath Serialization Reader/Writers Printing Text Component Model
.NET CF Interop ,[object Object],[object Object],[object Object]
General Strategy  ,[object Object],[object Object],[object Object],[object Object],[object Object]
General Architecture ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What is Supported ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Steps for Calling Native Code ,[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Steps for Calling Native Code
Two General Possibilities ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Calling Win32 Functions ,[object Object],[object Object],[object Object]
Finding the Win32 Function ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Declaring External Functions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
External Functions in VB ,[object Object],[object Object],Declare   Function  GetTickCount  Lib   "coredll.dll"  () _ As   Integer
External Function Prototypes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Which DLL? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Using DllImport ,[object Object],[object Object],[object Object],[DllImport ( "windowsUnManaged.dll" , EntryPoint= "TestProcW" ,  SetLastError= true )] public   static   extern   int  TestProc ( int  a,  byte [] b);
At Runtime ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Tips for using P/Invoke ,[object Object],[object Object],[object Object],[object Object]
Data Marshaling ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Marshaling Differences ,[object Object],[object Object],[object Object],[object Object]
Marshaling Differences 2 ,[object Object],[object Object],[object Object],[object Object],[object Object]
Marshaling Of Simple Types ,[object Object],*bool and Boolean do NOT always convert to a Win32 BOOL Not Supported (floating pont) Double double Not Supported (64-bit) Long long wchar (16-bit) Char char BYTE (8-bit) * Boolean bool Data of the Array int * Array Integer () Array  int [] wchar * String String short (16-bit) Short short int (32-bit integer) Integer int Native Code Visual Basic C#
Marshaling Simple Objects *Execution Engine will resize managed strings after native function call Marshaling Action Parameter Type Point at the member data Other objects Make a copy of the string and point at the data  (LPSTR) ByRef String* Point at the string data  (LPSTR) String Make a copy and point at the string data  (LPSTR) String Builder* Point at the array data Array
Marshaling Simple Objects ,[object Object],[object Object],[object Object],public   class  Rect  { int  left; int  top; int  right; int  bottom; } Native Code - C C# typedef   struct  _RECT  {  LONG left;  LONG top;  LONG right;  LONG bottom;  } RECT;
Marshaling Complex Objects ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Classic P/Invoke Areas ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Writing Native DLLs ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Tips for Writing Native DLLs ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Limitations  ,[object Object],[object Object],[object Object]
Code Example
External Events ,[object Object],[object Object],[object Object],[object Object],[object Object]
MessageWindow Class ,[object Object],[object Object],[object Object]
MessageWindow Class ,[object Object],[object Object],[object Object],[object Object]
Using MessageWindow ,[object Object],[object Object],[object Object],[object Object]
Using MessageWindow ,[object Object],[object Object],[object Object]
Compact Framework 2.0
V2 .NET CF Improvements ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
V2 .NET CF Improvements ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
V2 Language Improvements ,[object Object],[object Object],[object Object],[object Object],[object Object]
V2 Base Class Library Improvements ,[object Object],[object Object],[object Object],[object Object],[object Object]
New XML/Database Support ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Summary ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Suggested Reading And Resources ,[object Object],[object Object],The tools you need to put technology to work! TITLE Available Price Today $59.99 Programming Microsoft  Windows CE .NET ®
Questions [email_address] www.bolingconsulting.com

More Related Content

What's hot (17)

.Net framework interview questions
.Net framework interview questions.Net framework interview questions
.Net framework interview questions
 
Dot Net Fundamentals
Dot Net FundamentalsDot Net Fundamentals
Dot Net Fundamentals
 
DotNet Introduction
DotNet IntroductionDotNet Introduction
DotNet Introduction
 
.Net framework
.Net framework.Net framework
.Net framework
 
Dotnet framework
Dotnet frameworkDotnet framework
Dotnet framework
 
Visual Studio.NET
Visual Studio.NETVisual Studio.NET
Visual Studio.NET
 
.Net slid
.Net slid.Net slid
.Net slid
 
Asp net
Asp netAsp net
Asp net
 
test2PPT
test2PPTtest2PPT
test2PPT
 
Net Fundamentals
Net FundamentalsNet Fundamentals
Net Fundamentals
 
.Net platform an understanding
.Net platform an understanding.Net platform an understanding
.Net platform an understanding
 
Asp dot net
Asp dot netAsp dot net
Asp dot net
 
As Pdotnet
As PdotnetAs Pdotnet
As Pdotnet
 
Synapse india reviews sharing asp.net
Synapse india reviews sharing  asp.netSynapse india reviews sharing  asp.net
Synapse india reviews sharing asp.net
 
01 intro to programming in .net
01   intro to programming in .net01   intro to programming in .net
01 intro to programming in .net
 
.Net framework
.Net framework.Net framework
.Net framework
 
Introduction to .net
Introduction to .netIntroduction to .net
Introduction to .net
 

Similar to CFInterop

Nakov - .NET Framework Overview - English
Nakov - .NET Framework Overview - EnglishNakov - .NET Framework Overview - English
Nakov - .NET Framework Overview - English
Svetlin Nakov
 
Whidbey old
Whidbey old Whidbey old
Whidbey old
grenaud
 
Introdot Netc Sharp En
Introdot Netc Sharp EnIntrodot Netc Sharp En
Introdot Netc Sharp En
Gregory Renard
 
.Net overviewrajnish
.Net overviewrajnish.Net overviewrajnish
.Net overviewrajnish
Rajnish Kalla
 
Concepts of Asp.Net
Concepts of Asp.NetConcepts of Asp.Net
Concepts of Asp.Net
vidyamittal
 
.Net Overview -- Training (Lesson 1)
.Net Overview -- Training (Lesson 1).Net Overview -- Training (Lesson 1)
.Net Overview -- Training (Lesson 1)
Rishi Kothari
 
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
Thomas Conté
 
Net framework
Net frameworkNet framework
Net framework
jhsri
 

Similar to CFInterop (20)

MSMDC_CLI363
MSMDC_CLI363MSMDC_CLI363
MSMDC_CLI363
 
Nakov - .NET Framework Overview - English
Nakov - .NET Framework Overview - EnglishNakov - .NET Framework Overview - English
Nakov - .NET Framework Overview - English
 
Whidbey old
Whidbey old Whidbey old
Whidbey old
 
.Net overview
.Net overview.Net overview
.Net overview
 
.Net Overview
.Net Overview.Net Overview
.Net Overview
 
Introdot Netc Sharp En
Introdot Netc Sharp EnIntrodot Netc Sharp En
Introdot Netc Sharp En
 
.Net overviewrajnish
.Net overviewrajnish.Net overviewrajnish
.Net overviewrajnish
 
Concepts of Asp.Net
Concepts of Asp.NetConcepts of Asp.Net
Concepts of Asp.Net
 
Microsoft .NET Platform
Microsoft .NET PlatformMicrosoft .NET Platform
Microsoft .NET Platform
 
Component based software development
Component based software developmentComponent based software development
Component based software development
 
.Net Overview -- Training (Lesson 1)
.Net Overview -- Training (Lesson 1).Net Overview -- Training (Lesson 1)
.Net Overview -- Training (Lesson 1)
 
Csharp dot net
Csharp dot netCsharp dot net
Csharp dot net
 
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
 
Visual studio.net
Visual studio.netVisual studio.net
Visual studio.net
 
Introduction to dot net framework by vaishali sahare [katkar]
Introduction to dot net framework by vaishali sahare [katkar]Introduction to dot net framework by vaishali sahare [katkar]
Introduction to dot net framework by vaishali sahare [katkar]
 
Csharp dot net
Csharp dot netCsharp dot net
Csharp dot net
 
Net framework
Net frameworkNet framework
Net framework
 
Introduction To Dotnet
Introduction To DotnetIntroduction To Dotnet
Introduction To Dotnet
 
.net framework
.net framework.net framework
.net framework
 
.Net Debugging Techniques
.Net Debugging Techniques.Net Debugging Techniques
.Net Debugging Techniques
 

More from webuploader

Michael_Hulme_Banff_Social_Networking
Michael_Hulme_Banff_Social_NetworkingMichael_Hulme_Banff_Social_Networking
Michael_Hulme_Banff_Social_Networking
webuploader
 
cyberSecurity_Milliron
cyberSecurity_MillironcyberSecurity_Milliron
cyberSecurity_Milliron
webuploader
 
LiveseyMotleyPresentation
LiveseyMotleyPresentationLiveseyMotleyPresentation
LiveseyMotleyPresentation
webuploader
 
FairShare_Morningstar_022607
FairShare_Morningstar_022607FairShare_Morningstar_022607
FairShare_Morningstar_022607
webuploader
 
3_System_Requirements_and_Scaling
3_System_Requirements_and_Scaling3_System_Requirements_and_Scaling
3_System_Requirements_and_Scaling
webuploader
 
ScalabilityAvailability
ScalabilityAvailabilityScalabilityAvailability
ScalabilityAvailability
webuploader
 
scale_perf_best_practices
scale_perf_best_practicesscale_perf_best_practices
scale_perf_best_practices
webuploader
 
7496_Hall 070204 Research Faculty Summit
7496_Hall 070204 Research Faculty Summit7496_Hall 070204 Research Faculty Summit
7496_Hall 070204 Research Faculty Summit
webuploader
 
securing_syslog_onFreeBSD
securing_syslog_onFreeBSDsecuring_syslog_onFreeBSD
securing_syslog_onFreeBSD
webuploader
 
bh-us-02-murphey-freebsd
bh-us-02-murphey-freebsdbh-us-02-murphey-freebsd
bh-us-02-murphey-freebsd
webuploader
 

More from webuploader (20)

Michael_Hulme_Banff_Social_Networking
Michael_Hulme_Banff_Social_NetworkingMichael_Hulme_Banff_Social_Networking
Michael_Hulme_Banff_Social_Networking
 
socialpref
socialprefsocialpref
socialpref
 
cyberSecurity_Milliron
cyberSecurity_MillironcyberSecurity_Milliron
cyberSecurity_Milliron
 
PJO-3B
PJO-3BPJO-3B
PJO-3B
 
LiveseyMotleyPresentation
LiveseyMotleyPresentationLiveseyMotleyPresentation
LiveseyMotleyPresentation
 
FairShare_Morningstar_022607
FairShare_Morningstar_022607FairShare_Morningstar_022607
FairShare_Morningstar_022607
 
saito_porcupine
saito_porcupinesaito_porcupine
saito_porcupine
 
3_System_Requirements_and_Scaling
3_System_Requirements_and_Scaling3_System_Requirements_and_Scaling
3_System_Requirements_and_Scaling
 
ScalabilityAvailability
ScalabilityAvailabilityScalabilityAvailability
ScalabilityAvailability
 
scale_perf_best_practices
scale_perf_best_practicesscale_perf_best_practices
scale_perf_best_practices
 
7496_Hall 070204 Research Faculty Summit
7496_Hall 070204 Research Faculty Summit7496_Hall 070204 Research Faculty Summit
7496_Hall 070204 Research Faculty Summit
 
Chapter5
Chapter5Chapter5
Chapter5
 
Mak3
Mak3Mak3
Mak3
 
visagie_freebsd
visagie_freebsdvisagie_freebsd
visagie_freebsd
 
freebsd-watitis
freebsd-watitisfreebsd-watitis
freebsd-watitis
 
WCE031_WH06
WCE031_WH06WCE031_WH06
WCE031_WH06
 
securing_syslog_onFreeBSD
securing_syslog_onFreeBSDsecuring_syslog_onFreeBSD
securing_syslog_onFreeBSD
 
bh-us-02-murphey-freebsd
bh-us-02-murphey-freebsdbh-us-02-murphey-freebsd
bh-us-02-murphey-freebsd
 
evans
evansevans
evans
 
COMO2006
COMO2006COMO2006
COMO2006
 

Recently uploaded

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

CFInterop

  • 1. Compact Framework Interop Douglas Boling President Boling Consulting Inc. [email_address]
  • 2.
  • 3.
  • 4. Integration Imperative Web Applications Client Partner Partner Credit info Ad-hoc Screen scrape Email FAX B2C website HTML
  • 5. Integration Imperative Screen Scrape Client Website HTML
  • 6. Windows Embedded Platforms Windows XP Embedded The most complete embedded platform enabling advanced devices by delivering the power of Windows in componentized form Windows CE Windows CE integrates reliable real time capabilities with advanced Windows technologies to rapidly build a wide range of innovative, small-footprint devices
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39. Marshaling Simple Objects *Execution Engine will resize managed strings after native function call Marshaling Action Parameter Type Point at the member data Other objects Make a copy of the string and point at the data (LPSTR) ByRef String* Point at the string data (LPSTR) String Make a copy and point at the string data (LPSTR) String Builder* Point at the array data Array
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.