Difference between revisions of "Documentation/DevGuide/ProUNO/Bridge/Mapping of String"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Robot: Changing Category:Documentation/Developers Guide/Professional UNO)
m
Line 8: Line 8:
 
|NextPage=Documentation/DevGuide/ProUNO/Bridge/Mapping of Interfaces and Structures
 
|NextPage=Documentation/DevGuide/ProUNO/Bridge/Mapping of Interfaces and Structures
 
}}
 
}}
 +
[[zh:Zh/Documentation/DevGuide/ProUNO/Bridge/Mapping of String]]
 
{{DISPLAYTITLE:Mapping of String}}
 
{{DISPLAYTITLE:Mapping of String}}
 
A string is a data structure that is common in programming languages. Although the idea of a string is the same, the implementations and their creation can be quite different. For example, a C++ programmer has a range of possibilities to choose from (for example, <code>char*</code>, <code>char[ ]</code>, <code>wchar_t*</code>, <code>wchar_t[ ]</code>, <code>std::string</code>, <code>CString</code>, <code>BSTR</code>), whereas a JScript programmer can only use one kind of string. To use Automation across languages, it is necessary to use a string type that is common to all those languages, and that has the same binary representation. This particular string is declared as <code>BSTR</code> in COM. The name can be different, depending on the language. For example, in C++ there is a <code>BSTR</code> type, in VB it is called <code>String</code>, and in JScript every string defined is a <code>BSTR</code>. Refer to the documentation covering the <code>BSTR</code>s equivalent if using an Automation capable language not covered by this document.
 
A string is a data structure that is common in programming languages. Although the idea of a string is the same, the implementations and their creation can be quite different. For example, a C++ programmer has a range of possibilities to choose from (for example, <code>char*</code>, <code>char[ ]</code>, <code>wchar_t*</code>, <code>wchar_t[ ]</code>, <code>std::string</code>, <code>CString</code>, <code>BSTR</code>), whereas a JScript programmer can only use one kind of string. To use Automation across languages, it is necessary to use a string type that is common to all those languages, and that has the same binary representation. This particular string is declared as <code>BSTR</code> in COM. The name can be different, depending on the language. For example, in C++ there is a <code>BSTR</code> type, in VB it is called <code>String</code>, and in JScript every string defined is a <code>BSTR</code>. Refer to the documentation covering the <code>BSTR</code>s equivalent if using an Automation capable language not covered by this document.

Revision as of 08:06, 11 July 2008

A string is a data structure that is common in programming languages. Although the idea of a string is the same, the implementations and their creation can be quite different. For example, a C++ programmer has a range of possibilities to choose from (for example, char*, char[ ], wchar_t*, wchar_t[ ], std::string, CString, BSTR), whereas a JScript programmer can only use one kind of string. To use Automation across languages, it is necessary to use a string type that is common to all those languages, and that has the same binary representation. This particular string is declared as BSTR in COM. The name can be different, depending on the language. For example, in C++ there is a BSTR type, in VB it is called String, and in JScript every string defined is a BSTR. Refer to the documentation covering the BSTRs equivalent if using an Automation capable language not covered by this document.

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages