ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

oledlg_main.c
Go to the documentation of this file.
00001 /*
00002  *  OLEDLG library
00003  *
00004  *  Copyright 1998  Patrik Stridvall
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with this library; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
00019  */
00020 
00021 #include <stdarg.h>
00022 
00023 #include "windef.h"
00024 #include "winbase.h"
00025 #include "winerror.h"
00026 #include "wingdi.h"
00027 #include "winuser.h"
00028 #include "oledlg.h"
00029 #include "ole2.h"
00030 #include "oledlg_private.h"
00031 
00032 #include "wine/debug.h"
00033 
00034 WINE_DEFAULT_DEBUG_CHANNEL(ole);
00035 
00036 HINSTANCE OLEDLG_hInstance = 0;
00037 
00038 UINT cf_embed_source;
00039 UINT cf_embedded_object;
00040 UINT cf_link_source;
00041 UINT cf_object_descriptor;
00042 UINT cf_link_src_descriptor;
00043 UINT cf_ownerlink;
00044 UINT cf_filename;
00045 UINT cf_filenamew;
00046 
00047 UINT oleui_msg_help;
00048 UINT oleui_msg_enddialog;
00049 
00050 static void register_clipboard_formats(void)
00051 {
00052     /* These used to be declared in olestd.h, but that seems to have been removed from the api */
00053     static const WCHAR CF_EMBEDSOURCEW[]          = { 'E','m','b','e','d',' ','S','o','u','r','c','e',0 };
00054     static const WCHAR CF_EMBEDDEDOBJECTW[]       = { 'E','m','b','e','d','d','e','d',' ','O','b','j','e','c','t',0 };
00055     static const WCHAR CF_LINKSOURCEW[]           = { 'L','i','n','k',' ','S','o','u','r','c','e',0 };
00056     static const WCHAR CF_OBJECTDESCRIPTORW[]     = { 'O','b','j','e','c','t',' ','D','e','s','c','r','i','p','t','o','r',0 };
00057     static const WCHAR CF_LINKSRCDESCRIPTORW[]    = { 'L','i','n','k',' ','S','o','u','r','c','e',' ','D','e','s','c','r','i','p','t','o','r',0 };
00058     static const WCHAR CF_OWNERLINKW[]            = { 'O','w','n','e','r','L','i','n','k',0 };
00059     static const WCHAR CF_FILENAMEW[]             = { 'F','i','l','e','N','a','m','e',0 };
00060     static const WCHAR CF_FILENAMEWW[]            = { 'F','i','l','e','N','a','m','e','W',0 };
00061 
00062     /* Load in the same order as native to make debugging easier */
00063     cf_object_descriptor    = RegisterClipboardFormatW(CF_OBJECTDESCRIPTORW);
00064     cf_link_src_descriptor  = RegisterClipboardFormatW(CF_LINKSRCDESCRIPTORW);
00065     cf_embed_source         = RegisterClipboardFormatW(CF_EMBEDSOURCEW);
00066     cf_embedded_object      = RegisterClipboardFormatW(CF_EMBEDDEDOBJECTW);
00067     cf_link_source          = RegisterClipboardFormatW(CF_LINKSOURCEW);
00068     cf_ownerlink            = RegisterClipboardFormatW(CF_OWNERLINKW);
00069     cf_filename             = RegisterClipboardFormatW(CF_FILENAMEW);
00070     cf_filenamew            = RegisterClipboardFormatW(CF_FILENAMEWW);
00071 }
00072 
00073 static void register_messages(void)
00074 {
00075     oleui_msg_help             = RegisterWindowMessageW(SZOLEUI_MSG_HELPW);
00076     oleui_msg_enddialog        = RegisterWindowMessageW(SZOLEUI_MSG_ENDDIALOGW);
00077 }
00078 
00079 /***********************************************************************
00080  *      DllMain
00081  */
00082 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
00083 {
00084     TRACE("%p 0x%x %p\n", hinstDLL, fdwReason, fImpLoad);
00085 
00086     switch(fdwReason) {
00087     case DLL_PROCESS_ATTACH:
00088         DisableThreadLibraryCalls(hinstDLL);
00089         OLEDLG_hInstance = hinstDLL;
00090         register_clipboard_formats();
00091         register_messages();
00092         break;
00093 
00094     case DLL_PROCESS_DETACH:
00095         OLEDLG_hInstance = 0;
00096         break;
00097     }
00098     return TRUE;
00099 }
00100 
00101 
00102 /***********************************************************************
00103  *           OleUIAddVerbMenuA (OLEDLG.1)
00104  */
00105 BOOL WINAPI OleUIAddVerbMenuA(
00106   LPOLEOBJECT lpOleObj, LPCSTR lpszShortType,
00107   HMENU hMenu, UINT uPos, UINT uIDVerbMin, UINT uIDVerbMax,
00108   BOOL bAddConvert, UINT idConvert, HMENU *lphMenu)
00109 {
00110   FIXME("(%p, %s, %p, %d, %d, %d, %d, %d, %p): stub\n",
00111     lpOleObj, debugstr_a(lpszShortType),
00112     hMenu, uPos, uIDVerbMin, uIDVerbMax,
00113     bAddConvert, idConvert, lphMenu
00114   );
00115   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
00116   return FALSE;
00117 }
00118 
00119 /***********************************************************************
00120  *           OleUIAddVerbMenuW (OLEDLG.14)
00121  */
00122 BOOL WINAPI OleUIAddVerbMenuW(
00123   LPOLEOBJECT lpOleObj, LPCWSTR lpszShortType,
00124   HMENU hMenu, UINT uPos, UINT uIDVerbMin, UINT uIDVerbMax,
00125   BOOL bAddConvert, UINT idConvert, HMENU *lphMenu)
00126 {
00127   FIXME("(%p, %s, %p, %d, %d, %d, %d, %d, %p): stub\n",
00128     lpOleObj, debugstr_w(lpszShortType),
00129     hMenu, uPos, uIDVerbMin, uIDVerbMax,
00130     bAddConvert, idConvert, lphMenu
00131   );
00132   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
00133   return FALSE;
00134 }
00135 
00136 /***********************************************************************
00137  *           OleUICanConvertOrActivateAs (OLEDLG.2)
00138  */
00139 BOOL WINAPI OleUICanConvertOrActivateAs(
00140     REFCLSID rClsid, BOOL fIsLinkedObject, WORD wFormat)
00141 {
00142   FIXME("(%p, %d, %hd): stub\n",
00143     rClsid, fIsLinkedObject, wFormat
00144   );
00145   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
00146   return FALSE;
00147 }
00148 
00149 /***********************************************************************
00150  *           OleUIInsertObjectW (OLEDLG.20)
00151  */
00152 UINT WINAPI OleUIInsertObjectW(LPOLEUIINSERTOBJECTW lpOleUIInsertObject)
00153 {
00154   FIXME("(%p): stub\n", lpOleUIInsertObject);
00155   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
00156   return OLEUI_FALSE;
00157 }
00158 
00159 /***********************************************************************
00160  *           OleUIEditLinksA (OLEDLG.5)
00161  */
00162 UINT WINAPI OleUIEditLinksA(LPOLEUIEDITLINKSA lpOleUIEditLinks)
00163 {
00164   FIXME("(%p): stub\n", lpOleUIEditLinks);
00165   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
00166   return OLEUI_FALSE;
00167 }
00168 
00169 /***********************************************************************
00170  *           OleUIEditLinksW (OLEDLG.19)
00171  */
00172 UINT WINAPI OleUIEditLinksW(LPOLEUIEDITLINKSW lpOleUIEditLinks)
00173 {
00174   FIXME("(%p): stub\n", lpOleUIEditLinks);
00175   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
00176   return OLEUI_FALSE;
00177 }
00178 
00179 /***********************************************************************
00180  *           OleUIChangeIconA (OLEDLG.6)
00181  */
00182 UINT WINAPI OleUIChangeIconA(
00183   LPOLEUICHANGEICONA lpOleUIChangeIcon)
00184 {
00185   FIXME("(%p): stub\n", lpOleUIChangeIcon);
00186   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
00187   return OLEUI_FALSE;
00188 }
00189 
00190 /***********************************************************************
00191  *           OleUIChangeIconW (OLEDLG.16)
00192  */
00193 UINT WINAPI OleUIChangeIconW(
00194   LPOLEUICHANGEICONW lpOleUIChangeIcon)
00195 {
00196   FIXME("(%p): stub\n", lpOleUIChangeIcon);
00197   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
00198   return OLEUI_FALSE;
00199 }
00200 
00201 /***********************************************************************
00202  *           OleUIConvertA (OLEDLG.7)
00203  */
00204 UINT WINAPI OleUIConvertA(LPOLEUICONVERTA lpOleUIConvert)
00205 {
00206   FIXME("(%p): stub\n", lpOleUIConvert);
00207   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
00208   return OLEUI_FALSE;
00209 }
00210 
00211 /***********************************************************************
00212  *           OleUIConvertW (OLEDLG.18)
00213  */
00214 UINT WINAPI OleUIConvertW(LPOLEUICONVERTW lpOleUIConvert)
00215 {
00216   FIXME("(%p): stub\n", lpOleUIConvert);
00217   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
00218   return OLEUI_FALSE;
00219 }
00220 
00221 /***********************************************************************
00222  *           OleUIBusyA (OLEDLG.8)
00223  */
00224 UINT WINAPI OleUIBusyA(LPOLEUIBUSYA lpOleUIBusy)
00225 {
00226   FIXME("(%p): stub\n", lpOleUIBusy);
00227   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
00228   return OLEUI_FALSE;
00229 }
00230 
00231 /***********************************************************************
00232  *           OleUIBusyW (OLEDLG.15)
00233  */
00234 UINT WINAPI OleUIBusyW(LPOLEUIBUSYW lpOleUIBusy)
00235 {
00236   FIXME("(%p): stub\n", lpOleUIBusy);
00237   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
00238   return OLEUI_FALSE;
00239 }
00240 
00241 /***********************************************************************
00242  *           OleUIUpdateLinksA (OLEDLG.9)
00243  */
00244 BOOL WINAPI OleUIUpdateLinksA(
00245   LPOLEUILINKCONTAINERA lpOleUILinkCntr,
00246   HWND hwndParent, LPSTR lpszTitle, INT cLinks)
00247 {
00248   FIXME("(%p, %p, %s, %d): stub\n",
00249     lpOleUILinkCntr, hwndParent, debugstr_a(lpszTitle), cLinks
00250   );
00251   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
00252   return FALSE;
00253 }
00254 
00255 /***********************************************************************
00256  *           OleUIUpdateLinksW (OLEDLG.23)
00257  */
00258 BOOL WINAPI OleUIUpdateLinksW(
00259   LPOLEUILINKCONTAINERW lpOleUILinkCntr,
00260   HWND hwndParent, LPWSTR lpszTitle, INT cLinks)
00261 {
00262   FIXME("(%p, %p, %s, %d): stub\n",
00263     lpOleUILinkCntr, hwndParent, debugstr_w(lpszTitle), cLinks
00264   );
00265   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
00266   return FALSE;
00267 }
00268 
00269 /***********************************************************************
00270  *           OleUIPromptUserA (OLEDLG.10)
00271  */
00272 INT WINAPIV OleUIPromptUserA(
00273   INT nTemplate, HWND hwndParent, ...)
00274 {
00275   FIXME("(%d, %p, ...): stub\n", nTemplate, hwndParent);
00276   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
00277   return OLEUI_FALSE;
00278 }
00279 
00280 /***********************************************************************
00281  *           OleUIPromptUserW (OLEDLG.13)
00282  */
00283 INT WINAPIV OleUIPromptUserW(
00284   INT nTemplate, HWND hwndParent, ...)
00285 {
00286   FIXME("(%d, %p, ...): stub\n", nTemplate, hwndParent);
00287   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
00288   return OLEUI_FALSE;
00289 }
00290 
00291 /***********************************************************************
00292  *           OleUIObjectPropertiesA (OLEDLG.11)
00293  */
00294 UINT WINAPI OleUIObjectPropertiesA(
00295   LPOLEUIOBJECTPROPSA lpOleUIObjectProps)
00296 {
00297   FIXME("(%p): stub\n", lpOleUIObjectProps);
00298   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
00299   return OLEUI_FALSE;
00300 }
00301 
00302 /***********************************************************************
00303  *           OleUIObjectPropertiesW (OLEDLG.21)
00304  */
00305 UINT WINAPI OleUIObjectPropertiesW(
00306   LPOLEUIOBJECTPROPSW lpOleUIObjectProps)
00307 {
00308   FIXME("(%p): stub\n", lpOleUIObjectProps);
00309   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
00310   return OLEUI_FALSE;
00311 }
00312 
00313 /***********************************************************************
00314  *           OleUIChangeSourceA (OLEDLG.12)
00315  */
00316 UINT WINAPI OleUIChangeSourceA(
00317   LPOLEUICHANGESOURCEA lpOleUIChangeSource)
00318 {
00319   FIXME("(%p): stub\n", lpOleUIChangeSource);
00320   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
00321   return OLEUI_FALSE;
00322 }
00323 
00324 /***********************************************************************
00325  *           OleUIChangeSourceW (OLEDLG.17)
00326  */
00327 UINT WINAPI OleUIChangeSourceW(
00328   LPOLEUICHANGESOURCEW lpOleUIChangeSource)
00329 {
00330   FIXME("(%p): stub\n", lpOleUIChangeSource);
00331   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
00332   return OLEUI_FALSE;
00333 }

Generated on Sat May 26 2012 04:24:27 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.