Changeset 19078 in vbox for trunk/src/VBox/Main/cbinding
- Timestamp:
- Apr 21, 2009 1:28:53 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 46216
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/cbinding/VBoxXPCOMC.cpp
r18998 r19078 174 174 VBoxGetXPCOMCFunctions(unsigned uVersion) 175 175 { 176 /* The current version. */ 176 /* 177 * The current interface version. 178 */ 177 179 static const VBOXXPCOMC s_Functions = 178 180 { … … 197 199 }; 198 200 199 if ((uVersion & 0xffff0000U) != VBOX_XPCOMC_VERSION) 200 return NULL; /* not supported. */ 201 202 return &s_Functions; 201 if ((uVersion & 0xffff0000U) == (VBOX_XPCOMC_VERSION & 0xffff0000U)) 202 return &s_Functions; 203 204 /* 205 * Legacy interface version 1.0. 206 */ 207 static const struct VBOXXPCOMCV1 208 { 209 /** The size of the structure. */ 210 unsigned cb; 211 /** The structure version. */ 212 unsigned uVersion; 213 214 unsigned int (*pfnGetVersion)(void); 215 216 void (*pfnComInitialize)(IVirtualBox **virtualBox, ISession **session); 217 void (*pfnComUninitialize)(void); 218 219 void (*pfnComUnallocMem)(void *pv); 220 void (*pfnUtf16Free)(PRUnichar *pwszString); 221 void (*pfnUtf8Free)(char *pszString); 222 223 int (*pfnUtf16ToUtf8)(const PRUnichar *pwszString, char **ppszString); 224 int (*pfnUtf8ToUtf16)(const char *pszString, PRUnichar **ppwszString); 225 226 /** Tail version, same as uVersion. */ 227 unsigned uEndVersion; 228 } s_Functions_v1_0 = 229 { 230 sizeof(s_Functions_v1_0), 231 0x00010000U, 232 233 VBoxVersion, 234 235 VBoxComInitialize, 236 VBoxComUninitialize, 237 238 VBoxComUnallocMem, 239 VBoxUtf16Free, 240 VBoxUtf8Free, 241 242 VBoxUtf16ToUtf8, 243 VBoxUtf8ToUtf16, 244 245 0x00010000U 246 }; 247 248 if ((uVersion & 0xffff0000U) == 0x00010000U) 249 return (PCVBOXXPCOM)&s_Functions_v1_0; 250 251 /* 252 * Unsupported interface version. 253 */ 254 return NULL; 203 255 } 204 256
Note:
See TracChangeset
for help on using the changeset viewer.