winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
October 2009
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
1207 discussions
Start a n
N
ew thread
Owen Rudge : include: Add IAttach interface to mapidefs.h.
by Alexandre Julliard
01 Oct '09
01 Oct '09
Module: wine Branch: master Commit: aacc4815f98b37c31d84360e4017d1f91216a9dc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aacc4815f98b37c31d84360e4…
Author: Owen Rudge <orudge(a)codeweavers.com> Date: Thu Oct 1 14:11:13 2009 +0100 include: Add IAttach interface to mapidefs.h. --- include/mapidefs.h | 78 +++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 65 insertions(+), 13 deletions(-) diff --git a/include/mapidefs.h b/include/mapidefs.h index f63f8f6..f06c61f 100644 --- a/include/mapidefs.h +++ b/include/mapidefs.h @@ -84,8 +84,7 @@ typedef struct IAddrBook IAddrBook; typedef IAddrBook *LPADRBOOK; typedef struct IABContainer IABContainer; typedef IABContainer *LPABCONT; -typedef struct IAttach IAttach; -typedef IAttach *LPATTACH; +typedef struct IAttach *LPATTACH; typedef struct IDistList IDistList; typedef IDistList *LPDISTLIST; typedef struct IMailUser IMailUser; @@ -899,17 +898,17 @@ DECLARE_INTERFACE_(IMAPIProp,IUnknown) #define IMAPIProp_AddRef(p) (p)->lpVtbl->AddRef(p) #define IMAPIProp_Release(p) (p)->lpVtbl->Release(p) /*** IMAPIProp methods ***/ -#define IMAPIProp_GetLastError(p,a,b,c) (p)->lpVtbl->GetLastError(p,a,b,c) -#define IMAPIProp_SaveChanges(p,a) (p)->lpVtbl->SaveChanges(p,a) -#define IMAPIProp_GetProps(p,a,b,c,d) (p)->lpVtbl->GetProps(p,a,b,c,d) -#define IMAPIProp_GetPropList(p,a,b) (p)->lpVtbl->GetPropList(p,a,b) -#define IMAPIProp_OpenProperty(p,a,b,c,d,e) (p)->lpVtbl->OpenProperty(p,a,b,c,d,e) -#define IMAPIProp_SetProps(p,a,b,c) (p)->lpVtbl->SetProps(p,a,b,c) -#define IMAPIProp_DeleteProps(p,a,b) (p)->lpVtbl->DeleteProps(p,a,b) -#define IMAPIProp_CopyTo(p,a,b,c,d,e,f,g,h,i) (p)->lpVtbl->CopyTo(p,a,b,c,d,e,f,g,h,i) -#define IMAPIProp_CopyProps(p,a,b,c,d,e,f,g) (p)->lpVtbl->CopyProps(p,a,b,c,d,e,f,g) -#define IMAPIProp_GetNamesFromIDs(p,a,b,c,d,e) (p)->lpVtbl->GetNamesFromIDs(p,a,b,c,d,e) -#define IMAPIProp_GetIDsFromNames(p,a,b,c,d) (p)->lpVtbl->GetIDsFromNames(p,a,b,c,d) +#define IMAPIProp_GetLastError(p,a,b,c) (p)->lpVtbl->GetLastError(p,a,b,c) +#define IMAPIProp_SaveChanges(p,a) (p)->lpVtbl->SaveChanges(p,a) +#define IMAPIProp_GetProps(p,a,b,c,d) (p)->lpVtbl->GetProps(p,a,b,c,d) +#define IMAPIProp_GetPropList(p,a,b) (p)->lpVtbl->GetPropList(p,a,b) +#define IMAPIProp_OpenProperty(p,a,b,c,d,e) (p)->lpVtbl->OpenProperty(p,a,b,c,d,e) +#define IMAPIProp_SetProps(p,a,b,c) (p)->lpVtbl->SetProps(p,a,b,c) +#define IMAPIProp_DeleteProps(p,a,b) (p)->lpVtbl->DeleteProps(p,a,b) +#define IMAPIProp_CopyTo(p,a,b,c,d,e,f,g,h,i) (p)->lpVtbl->CopyTo(p,a,b,c,d,e,f,g,h,i) +#define IMAPIProp_CopyProps(p,a,b,c,d,e,f,g) (p)->lpVtbl->CopyProps(p,a,b,c,d,e,f,g) +#define IMAPIProp_GetNamesFromIDs(p,a,b,c,d,e) (p)->lpVtbl->GetNamesFromIDs(p,a,b,c,d,e) +#define IMAPIProp_GetIDsFromNames(p,a,b,c,d) (p)->lpVtbl->GetIDsFromNames(p,a,b,c,d) #endif typedef IMAPIProp *LPMAPIPROP; @@ -1271,4 +1270,57 @@ DECLARE_INTERFACE_(IMessage,IMAPIProp) #define MSGFLAG_HASATTACH 0x00000010U #define MSGFLAG_FROMME 0x00000020U +/***************************************************************************** + * IAttach interface + */ +#define INTERFACE IAttach +DECLARE_INTERFACE_(IAttach,IMAPIProp) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IMAPIProp methods ***/ + STDMETHOD(GetLastError)(THIS_ HRESULT hRes, ULONG ulFlags, LPMAPIERROR *lppErr) PURE; + STDMETHOD(SaveChanges)(THIS_ ULONG ulFlags) PURE; + STDMETHOD(GetProps)(THIS_ LPSPropTagArray lpPropTags, ULONG ulFlags, ULONG *lpValues, LPSPropValue *lppProps) PURE; + STDMETHOD(GetPropList)(THIS_ ULONG ulFlags, LPSPropTagArray *lppPropTagArray) PURE; + STDMETHOD(OpenProperty)(THIS_ ULONG ulPropTag, LPCIID lpIid, ULONG ulOpts, ULONG ulFlags, LPUNKNOWN *lppUnk) PURE; + STDMETHOD(SetProps)(THIS_ ULONG cValues, LPSPropValue lpProps, LPSPropProblemArray *lppProbs) PURE; + STDMETHOD(DeleteProps)(THIS_ LPSPropTagArray lpPropTags, LPSPropProblemArray *lppProbs) PURE; + STDMETHOD(CopyTo)(THIS_ ULONG ciidExclude, LPCIID lpIid, LPSPropTagArray lpProps, ULONG ulParam, + LPMAPIPROGRESS lpProgress, LPCIID lpIface,LPVOID lpDest, ULONG ulFlags, + LPSPropProblemArray *lppProbs) PURE; + STDMETHOD(CopyProps)(THIS_ LPSPropTagArray lpIncludeProps, ULONG ulParam, LPMAPIPROGRESS lpProgress, + LPCIID lpIid, LPVOID lpDestObj, ULONG ulFlags, LPSPropProblemArray *lppProblems) PURE; + STDMETHOD(GetNamesFromIDs)(THIS_ LPSPropTagArray *lppPropTags, LPGUID lpIid, ULONG ulFlags, ULONG *lpCount, + LPMAPINAMEID **lpppNames) PURE; + STDMETHOD(GetIDsFromNames)(THIS_ ULONG cPropNames, LPMAPINAMEID *lppNames, ULONG ulFlags, LPSPropTagArray *lppPropTags) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) + /*** IUnknown methods ***/ +#define IAttach_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IAttach_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IAttach_Release(p) (p)->lpVtbl->Release(p) + /*** IMAPIProp methods ***/ +#define IAttach_GetLastError(p,a,b,c) (p)->lpVtbl->GetLastError(p,a,b,c) +#define IAttach_SaveChanges(p,a) (p)->lpVtbl->SaveChanges(p,a) +#define IAttach_GetProps(p,a,b,c,d) (p)->lpVtbl->GetProps(p,a,b,c,d) +#define IAttach_GetPropList(p,a,b) (p)->lpVtbl->GetPropList(p,a,b) +#define IAttach_OpenProperty(p,a,b,c,d,e) (p)->lpVtbl->OpenProperty(p,a,b,c,d,e) +#define IAttach_SetProps(p,a,b,c) (p)->lpVtbl->SetProps(p,a,b,c) +#define IAttach_DeleteProps(p,a,b) (p)->lpVtbl->DeleteProps(p,a,b) +#define IAttach_CopyTo(p,a,b,c,d,e,f,g,h,i) (p)->lpVtbl->CopyTo(p,a,b,c,d,e,f,g,h,i) +#define IAttach_CopyProps(p,a,b,c,d,e,f,g) (p)->lpVtbl->CopyProps(p,a,b,c,d,e,f,g) +#define IAttach_GetNamesFromIDs(p,a,b,c,d,e) (p)->lpVtbl->GetNamesFromIDs(p,a,b,c,d,e) +#define IAttach_GetIDsFromNames(p,a,b,c,d) (p)->lpVtbl->GetIDsFromNames(p,a,b,c,d) +#endif + +/* Attachment flags */ + +#define NO_ATTACHMENT 0x00000000U +#define ATTACH_BY_VALUE 0x00000001U + #endif /*MAPIDEFS_H*/
1
0
0
0
Owen Rudge : mapi32: Create new message and show editor window.
by Alexandre Julliard
01 Oct '09
01 Oct '09
Module: wine Branch: master Commit: b4ea2ead8aaba4d0970b43b77622c41c906e9186 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b4ea2ead8aaba4d0970b43b77…
Author: Owen Rudge <orudge(a)codeweavers.com> Date: Thu Oct 1 14:11:10 2009 +0100 mapi32: Create new message and show editor window. --- dlls/mapi32/sendmail.c | 111 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 111 insertions(+), 0 deletions(-) diff --git a/dlls/mapi32/sendmail.c b/dlls/mapi32/sendmail.c index c7e0cfd..550406b 100644 --- a/dlls/mapi32/sendmail.c +++ b/dlls/mapi32/sendmail.c @@ -25,10 +25,13 @@ #include <stdio.h> #include <stdarg.h> +#define COBJMACROS + #include "windef.h" #include "winbase.h" #include "winerror.h" #include "objbase.h" +#include "objidl.h" #include "mapi.h" #include "mapix.h" #include "mapiutil.h" @@ -59,6 +62,7 @@ static ULONG sendmail_extended_mapi(LHANDLE mapi_session, ULONG_PTR uiparam, lpM LPSPropValue props; ULONG entry_len; DWORD obj_type; + IMessage* msg; ULONG values; HRESULT ret; @@ -147,6 +151,113 @@ static ULONG sendmail_extended_mapi(LHANDLE mapi_session, ULONG_PTR uiparam, lpM IMsgStore_OpenEntry(msg_store, props[0].Value.bin.cb, (LPENTRYID) props[0].Value.bin.lpb, NULL, MAPI_MODIFY, &obj_type, (LPUNKNOWN *) &folder); + /* Create a new message */ + if (IMAPIFolder_CreateMessage(folder, NULL, 0, &msg) == S_OK) + { + ULONG token; + SPropValue p; + + /* Define message properties */ + p.ulPropTag = PR_MESSAGE_FLAGS; + p.Value.l = MSGFLAG_FROMME | MSGFLAG_UNSENT; + + IMessage_SetProps(msg, 1, &p, NULL); + + p.ulPropTag = PR_SENTMAIL_ENTRYID; + p.Value.bin.cb = props[0].Value.bin.cb; + p.Value.bin.lpb = props[0].Value.bin.lpb; + IMessage_SetProps(msg, 1,&p, NULL); + + /* Set message subject */ + if (message->lpszSubject) + { + p.ulPropTag = PR_SUBJECT_A; + p.Value.lpszA = message->lpszSubject; + IMessage_SetProps(msg, 1, &p, NULL); + } + + /* Set message body */ + if (message->lpszNoteText) + { + LPSTREAM stream = NULL; + + if (IMessage_OpenProperty(msg, PR_BODY_A, &IID_IStream, 0, + MAPI_MODIFY | MAPI_CREATE, (LPUNKNOWN*) &stream) == S_OK) + { + IStream_Write(stream, message->lpszNoteText, strlen(message->lpszNoteText)+1, NULL); + IStream_Release(stream); + } + } + + /* Add message attachments */ + if (message->nFileCount > 0) + { + FIXME("TODO: %d attachments\n", message->nFileCount); + } + + IMessage_SaveChanges(msg, KEEP_OPEN_READWRITE); + + /* Prepare the message form */ + + if (IMAPISession_PrepareForm(session, NULL, msg, &token) == S_OK) + { + ULONG access = 0, status = 0, flags = 0, pc = 0; + ULONG pT[2] = {1, PR_MSG_STATUS}; + + /* Retrieve message status, flags, access rights and class */ + + if (IMessage_GetProps(msg, (LPSPropTagArray) pT, 0, &pc, &props) == S_OK) + { + status = props->Value.ul; + MAPIFreeBuffer(props); + } + + pT[1] = PR_MESSAGE_FLAGS; + + if (IMessage_GetProps(msg, (LPSPropTagArray) pT, 0, &pc, &props) == S_OK) + { + flags = props->Value.ul; + MAPIFreeBuffer(props); + } + + pT[1] = PR_ACCESS; + + if (IMessage_GetProps(msg, (LPSPropTagArray) pT, 0, &pc, &props) == S_OK) + { + access = props->Value.ul; + MAPIFreeBuffer(props); + } + + pT[1] = PR_MESSAGE_CLASS_A; + + if (IMessage_GetProps(msg, (LPSPropTagArray) pT, 0, &pc, &props) == S_OK) + { + /* Show the message form (edit window) */ + + ret = IMAPISession_ShowForm(session, 0, msg_store, folder, NULL, + token, NULL, 0, status, flags, access, + props->Value.lpszA); + + switch (ret) + { + case S_OK: + retval = SUCCESS_SUCCESS; + break; + + case MAPI_E_USER_CANCEL: + retval = MAPI_E_USER_ABORT; + break; + + default: + TRACE("ShowForm failure: %x\n", ret); + break; + } + } + } + + IMessage_Release(msg); + } + /* Free up the resources we've used */ IMAPIFolder_Release(folder); IMsgStore_Release(msg_store);
1
0
0
0
Owen Rudge : mapi32: Open the Drafts folder in preparation for creating a message.
by Alexandre Julliard
01 Oct '09
01 Oct '09
Module: wine Branch: master Commit: 6e33bfb76732b3d739454f2b9c42d1cfd1c32169 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6e33bfb76732b3d739454f2b9…
Author: Owen Rudge <orudge(a)codeweavers.com> Date: Thu Oct 1 14:11:07 2009 +0100 mapi32: Open the Drafts folder in preparation for creating a message. --- dlls/mapi32/sendmail.c | 38 ++++++++++++++++++++++++++++++++++++++ include/mapitags.h | 1 + 2 files changed, 39 insertions(+), 0 deletions(-) diff --git a/dlls/mapi32/sendmail.c b/dlls/mapi32/sendmail.c index d644525..c7e0cfd 100644 --- a/dlls/mapi32/sendmail.c +++ b/dlls/mapi32/sendmail.c @@ -48,10 +48,18 @@ WINE_DEFAULT_DEBUG_CHANNEL(mapi); static ULONG sendmail_extended_mapi(LHANDLE mapi_session, ULONG_PTR uiparam, lpMapiMessage message, FLAGS flags, ULONG reserved) { + ULONG tags[] = {1, PR_IPM_DRAFTS_ENTRYID}; ULONG retval = MAPI_E_FAILURE; IMAPISession *session = NULL; IMAPITable* msg_table; LPSRowSet rows = NULL; + IMsgStore* msg_store; + IMAPIFolder* folder; + LPENTRYID entry_id; + LPSPropValue props; + ULONG entry_len; + DWORD obj_type; + ULONG values; HRESULT ret; TRACE("Using Extended MAPI wrapper for MAPISendMail\n"); @@ -110,9 +118,39 @@ static ULONG sendmail_extended_mapi(LHANDLE mapi_session, ULONG_PTR uiparam, lpM if (!rows) goto logoff; + /* Open the message store */ + IMAPISession_OpenMsgStore(session, 0, rows->aRow[0].lpProps[0].Value.bin.cb, + (ENTRYID *) rows->aRow[0].lpProps[0].Value.bin.lpb, NULL, + MDB_NO_DIALOG | MAPI_BEST_ACCESS, &msg_store); + /* We don't need this any more */ FreeProws(rows); + /* First open the inbox, from which the drafts folder can be opened */ + if (IMsgStore_GetReceiveFolder(msg_store, NULL, 0, &entry_len, &entry_id, NULL) == S_OK) + { + IMsgStore_OpenEntry(msg_store, entry_len, entry_id, NULL, 0, &obj_type, (LPUNKNOWN*) &folder); + MAPIFreeBuffer(entry_id); + } + + /* Open the drafts folder, or failing that, try asking the message store for the outbox */ + if ((folder == NULL) || ((ret = IMAPIFolder_GetProps(folder, (LPSPropTagArray) tags, 0, &values, &props)) != S_OK)) + { + TRACE("Unable to open Drafts folder; opening Outbox instead\n"); + tags[1] = PR_IPM_OUTBOX_ENTRYID; + ret = IMsgStore_GetProps(msg_store, (LPSPropTagArray) tags, 0, &values, &props); + } + + if (ret != S_OK) + goto logoff; + + IMsgStore_OpenEntry(msg_store, props[0].Value.bin.cb, (LPENTRYID) props[0].Value.bin.lpb, + NULL, MAPI_MODIFY, &obj_type, (LPUNKNOWN *) &folder); + + /* Free up the resources we've used */ + IMAPIFolder_Release(folder); + IMsgStore_Release(msg_store); + logoff: ; IMAPISession_Logoff(session, (ULONG) NULL, 0, 0); IMAPISession_Release(session); diff --git a/include/mapitags.h b/include/mapitags.h index abeee48..48f4dc1 100644 --- a/include/mapitags.h +++ b/include/mapitags.h @@ -452,6 +452,7 @@ #define PR_AB_PROVIDER_ID PROP_TAG(PT_BINARY,0x3615) #define PR_DEFAULT_VIEW_ENTRYID PROP_TAG(PT_BINARY,0x3616) #define PR_ASSOC_CONTENT_COUNT PROP_TAG(PT_I4,0x3617) +#define PR_IPM_DRAFTS_ENTRYID PROP_TAG(PT_BINARY,0x36D7) #define PR_ATTACHMENT_X400_PARAMETERS PROP_TAG(PT_BINARY,0x3700) #define PR_ATTACH_DATA_OBJ PROP_TAG(PT_OBJECT,0x3701) #define PR_ATTACH_DATA_BIN PROP_TAG(PT_BINARY,0x3701)
1
0
0
0
Owen Rudge : include: Add definitions for IMAPIContainer, IMAPIFolder, IMessage.
by Alexandre Julliard
01 Oct '09
01 Oct '09
Module: wine Branch: master Commit: 8555035d694424e7103aff09b1542590575a9d8b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8555035d694424e7103aff09b…
Author: Owen Rudge <orudge(a)codeweavers.com> Date: Thu Oct 1 14:11:03 2009 +0100 include: Add definitions for IMAPIContainer, IMAPIFolder, IMessage. --- include/mapidefs.h | 245 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 239 insertions(+), 6 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=8555035d694424e7103af…
1
0
0
0
Owen Rudge : include: Add IMsgStore definition.
by Alexandre Julliard
01 Oct '09
01 Oct '09
Module: wine Branch: master Commit: 3372d6febc0f12903a15babb31ecbec438b0a16a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3372d6febc0f12903a15babb3…
Author: Owen Rudge <orudge(a)codeweavers.com> Date: Thu Oct 1 14:11:00 2009 +0100 include: Add IMsgStore definition. --- include/mapidefs.h | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 87 insertions(+), 2 deletions(-) diff --git a/include/mapidefs.h b/include/mapidefs.h index 31ebf43..90131d5 100644 --- a/include/mapidefs.h +++ b/include/mapidefs.h @@ -1,5 +1,6 @@ /* * Copyright (C) 1998 Justin Bradford + * Copyright (c) 2009 Owen Rudge for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -100,8 +101,6 @@ typedef struct IMAPIStatus IMAPIStatus; typedef IMAPIStatus *LPMAPISTATUS; typedef struct IMessage IMessage; typedef IMessage *LPMESSAGE; -typedef struct IMsgStore IMsgStore; -typedef IMsgStore *LPMDB; typedef struct IProfSect IProfSect; typedef IProfSect *LPPROFSECT; typedef struct IProviderAdmin IProviderAdmin; @@ -765,6 +764,9 @@ typedef struct _NOTIFICATION typedef LONG (WINAPI NOTIFCALLBACK)(LPVOID,ULONG,LPNOTIFICATION); typedef NOTIFCALLBACK *LPNOTIFCALLBACK; +/* IMAPIContainer::OpenEntry flags */ +#define MAPI_BEST_ACCESS 0x00000010 + /***************************************************************************** * IMAPITable interface * @@ -914,6 +916,89 @@ DECLARE_INTERFACE_(IMAPIProp,IUnknown) typedef IMAPIProp *LPMAPIPROP; +/***************************************************************************** + * IMsgStore interface + */ +#define INTERFACE IMsgStore +DECLARE_INTERFACE_(IMsgStore,IMAPIProp) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IMAPIProp methods ***/ + STDMETHOD(GetLastError)(THIS_ HRESULT hRes, ULONG ulFlags, LPMAPIERROR *lppErr) PURE; + STDMETHOD(SaveChanges)(THIS_ ULONG ulFlags) PURE; + STDMETHOD(GetProps)(THIS_ LPSPropTagArray lpPropTags, ULONG ulFlags, ULONG *lpValues, LPSPropValue *lppProps) PURE; + STDMETHOD(GetPropList)(THIS_ ULONG ulFlags, LPSPropTagArray *lppPropTagArray) PURE; + STDMETHOD(OpenProperty)(THIS_ ULONG ulPropTag, LPCIID lpIid, ULONG ulOpts, ULONG ulFlags, LPUNKNOWN *lppUnk) PURE; + STDMETHOD(SetProps)(THIS_ ULONG cValues, LPSPropValue lpProps, LPSPropProblemArray *lppProbs) PURE; + STDMETHOD(DeleteProps)(THIS_ LPSPropTagArray lpPropTags, LPSPropProblemArray *lppProbs) PURE; + STDMETHOD(CopyTo)(THIS_ ULONG ciidExclude, LPCIID lpIid, LPSPropTagArray lpProps, ULONG ulParam, + LPMAPIPROGRESS lpProgress, LPCIID lpIface,LPVOID lpDest, ULONG ulFlags, + LPSPropProblemArray *lppProbs) PURE; + STDMETHOD(CopyProps)(THIS_ LPSPropTagArray lpIncludeProps, ULONG ulParam, LPMAPIPROGRESS lpProgress, + LPCIID lpIid, LPVOID lpDestObj, ULONG ulFlags, LPSPropProblemArray *lppProblems) PURE; + STDMETHOD(GetNamesFromIDs)(THIS_ LPSPropTagArray *lppPropTags, LPGUID lpIid, ULONG ulFlags, ULONG *lpCount, + LPMAPINAMEID **lpppNames) PURE; + STDMETHOD(GetIDsFromNames)(THIS_ ULONG cPropNames, LPMAPINAMEID *lppNames, ULONG ulFlags, LPSPropTagArray *lppPropTags) PURE; + /*** IMsgStore methods ***/ + STDMETHOD(Advise)(THIS_ ULONG cbEntryID, LPENTRYID lpEntryID, ULONG ulEventMask, LPMAPIADVISESINK lpAdviseSink, + ULONG * lpulConnection) PURE; + STDMETHOD(Unadvise)(THIS_ ULONG ulConnection) PURE; + STDMETHOD(CompareEntryIDs)(THIS_ ULONG cbEntryID1, LPENTRYID lpEntryID1, ULONG cbEntryID2, LPENTRYID lpEntryID2, + ULONG ulFlags, ULONG * lpulResult) PURE; + STDMETHOD(OpenEntry)(THIS_ ULONG cbEntryID, LPENTRYID lpEntryID, LPCIID lpInterface, ULONG ulFlags, ULONG *lpulObjType, + LPUNKNOWN *lppUnk) PURE; + STDMETHOD(SetReceiveFolder)(THIS_ LPSTR lpszMessageClass, ULONG ulFlags, ULONG cbEntryID, LPENTRYID lpEntryID) PURE; + STDMETHOD(GetReceiveFolder)(THIS_ LPSTR lpszMessageClass, ULONG ulFlags, ULONG * lpcbEntryID, LPENTRYID *lppEntryID, + LPSTR *lppszExplicitClass) PURE; + STDMETHOD(GetReceiveFolderTable)(THIS_ ULONG ulFlags, LPMAPITABLE * lppTable) PURE; + STDMETHOD(StoreLogoff)(THIS_ ULONG * lpulFlags) PURE; + STDMETHOD(AbortSubmit)(THIS_ ULONG cbEntryID, LPENTRYID lpEntryID, ULONG ulFlags) PURE; + STDMETHOD(GetOutgoingQueue)(THIS_ ULONG ulFlags, LPMAPITABLE * lppTable) PURE; + STDMETHOD(SetLockState)(THIS_ LPMESSAGE lpMessage, ULONG ulLockState) PURE; + STDMETHOD(FinishedMsg)(THIS_ ULONG ulFlags, ULONG cbEntryID, LPENTRYID lpEntryID) PURE; + STDMETHOD(NotifyNewMail)(THIS_ LPNOTIFICATION lpNotification) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) + /*** IUnknown methods ***/ +#define IMsgStore_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IMsgStore_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IMsgStore_Release(p) (p)->lpVtbl->Release(p) + /*** IMAPIProp methods ***/ +#define IMsgStore_GetLastError(p,a,b,c) (p)->lpVtbl->GetLastError(p,a,b,c) +#define IMsgStore_SaveChanges(p,a) (p)->lpVtbl->SaveChanges(p,a) +#define IMsgStore_GetProps(p,a,b,c,d) (p)->lpVtbl->GetProps(p,a,b,c,d) +#define IMsgStore_GetPropList(p,a,b) (p)->lpVtbl->GetPropList(p,a,b) +#define IMsgStore_OpenProperty(p,a,b,c,d,e) (p)->lpVtbl->OpenProperty(p,a,b,c,d,e) +#define IMsgStore_SetProps(p,a,b,c) (p)->lpVtbl->SetProps(p,a,b,c) +#define IMsgStore_DeleteProps(p,a,b) (p)->lpVtbl->DeleteProps(p,a,b) +#define IMsgStore_CopyTo(p,a,b,c,d,e,f,g,h,i) (p)->lpVtbl->CopyTo(p,a,b,c,d,e,f,g,h,i) +#define IMsgStore_CopyProps(p,a,b,c,d,e,f,g) (p)->lpVtbl->CopyProps(p,a,b,c,d,e,f,g) +#define IMsgStore_GetNamesFromIDs(p,a,b,c,d,e) (p)->lpVtbl->GetNamesFromIDs(p,a,b,c,d,e) +#define IMsgStore_GetIDsFromNames(p,a,b,c,d) (p)->lpVtbl->GetIDsFromNames(p,a,b,c,d) + /*** IMsgStore methods ***/ +#define IMsgStore_Advise(p,a,b,c,d,e) (p)->lpVtbl->Advise(p,a,b,c,d,e) +#define IMsgStore_Unadvise(p,a) (p)->lpVtbl->Unadvise(p,a) +#define IMsgStore_CompareEntryIDs(p,a,b,c,d,e,f) (p)->lpVtbl->CompareEntryIDs(p,a,b,c,d,e,f) +#define IMsgStore_OpenEntry(p,a,b,c,d,e,f) (p)->lpVtbl->OpenEntry(p,a,b,c,d,e,f) +#define IMsgStore_SetReceiveFolder(p,a,b,c,d) (p)->lpVtbl->SetReceiveFolder(p,a,b,c,d) +#define IMsgStore_GetReceiveFolder(p,a,b,c,d,e) (p)->lpVtbl->GetReceiveFolder(p,a,b,c,d,e) +#define IMsgStore_GetReceiveFolderTable(p,a,b) (p)->lpVtbl->GetReceiveFolderTable(p,a,b) +#define IMsgStore_StoreLogoff(p,a) (p)->lpVtbl->StoreLogoff(p,a) +#define IMsgStore_AbortSubmit(p,a,b,c) (p)->lpVtbl->AbortSubmit(p,a,b,c) +#define IMsgStore_GetOutgoingQueue(p,a,b) (p)->lpVtbl->GetOutgoingQueue(p,a,b) +#define IMsgStore_SetLockState(p,a,b) (p)->lpVtbl->SetLockState(p,a,b) +#define IMsgStore_FinishedMsg(p,a,b,c) (p)->lpVtbl->FinishedMsg(p,a,b,c) +#define IMsgStore_NotifyNewMail(p,a) (p)->lpVtbl->NotifyNewMail(p,a) + +#endif + +typedef IMsgStore *LPMDB; + typedef struct { ULONG cb;
1
0
0
0
Owen Rudge : mapi32: Log on via Extended MAPI and get the default message store.
by Alexandre Julliard
01 Oct '09
01 Oct '09
Module: wine Branch: master Commit: 45c265f0db82589e0943ddf0746ed6c143d4f402 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=45c265f0db82589e0943ddf07…
Author: Owen Rudge <orudge(a)codeweavers.com> Date: Thu Oct 1 14:10:57 2009 +0100 mapi32: Log on via Extended MAPI and get the default message store. --- dlls/mapi32/sendmail.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 72 insertions(+), 1 deletions(-) diff --git a/dlls/mapi32/sendmail.c b/dlls/mapi32/sendmail.c index d98f8bf..d644525 100644 --- a/dlls/mapi32/sendmail.c +++ b/dlls/mapi32/sendmail.c @@ -30,6 +30,9 @@ #include "winerror.h" #include "objbase.h" #include "mapi.h" +#include "mapix.h" +#include "mapiutil.h" +#include "mapidefs.h" #include "winreg.h" #include "shellapi.h" #include "shlwapi.h" @@ -45,10 +48,78 @@ WINE_DEFAULT_DEBUG_CHANNEL(mapi); static ULONG sendmail_extended_mapi(LHANDLE mapi_session, ULONG_PTR uiparam, lpMapiMessage message, FLAGS flags, ULONG reserved) { + ULONG retval = MAPI_E_FAILURE; + IMAPISession *session = NULL; + IMAPITable* msg_table; + LPSRowSet rows = NULL; + HRESULT ret; + TRACE("Using Extended MAPI wrapper for MAPISendMail\n"); + /* Attempt to log on via Extended MAPI */ + + ret = MAPILogonEx(0, NULL, NULL, MAPI_EXTENDED | MAPI_USE_DEFAULT | MAPI_NEW_SESSION, &session); + TRACE("MAPILogonEx: %x\n", ret); + + if (ret != S_OK) + { + retval = MAPI_E_LOGIN_FAILURE; + goto cleanup; + } + + /* Open the default message store */ + + if (IMAPISession_GetMsgStoresTable(session, 0, &msg_table) == S_OK) + { + /* We want the default store */ + SizedSPropTagArray(2, columns) = {2, {PR_ENTRYID, PR_DEFAULT_STORE}}; + + /* Set the columns we want */ + if (IMAPITable_SetColumns(msg_table, (LPSPropTagArray) &columns, 0) == S_OK) + { + while (1) + { + if (IMAPITable_QueryRows(msg_table, 1, 0, &rows) != S_OK) + { + MAPIFreeBuffer(rows); + rows = NULL; + } + else if (rows->cRows != 1) + { + FreeProws(rows); + rows = NULL; + } + else + { + /* If it's not the default store, try the next row */ + if (!rows->aRow[0].lpProps[1].Value.b) + { + FreeProws(rows); + continue; + } + } + + break; + } + } + + IMAPITable_Release(msg_table); + } + + /* Did we manage to get the right store? */ + if (!rows) + goto logoff; + + /* We don't need this any more */ + FreeProws(rows); + +logoff: ; + IMAPISession_Logoff(session, (ULONG) NULL, 0, 0); + IMAPISession_Release(session); + +cleanup: ; MAPIUninitialize(); - return MAPI_E_FAILURE; + return retval; } /**************************************************************************
1
0
0
0
Owen Rudge : include: Add MAPI_USE_DEFAULT and MDB_NO_DIALOG definitions to mapidefs.h.
by Alexandre Julliard
01 Oct '09
01 Oct '09
Module: wine Branch: master Commit: 82f25f5445a63bd9a6520391639d2253eca63508 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=82f25f5445a63bd9a65203916…
Author: Owen Rudge <orudge(a)codeweavers.com> Date: Thu Oct 1 14:10:54 2009 +0100 include: Add MAPI_USE_DEFAULT and MDB_NO_DIALOG definitions to mapidefs.h. --- include/mapidefs.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/include/mapidefs.h b/include/mapidefs.h index 2744427..31ebf43 100644 --- a/include/mapidefs.h +++ b/include/mapidefs.h @@ -162,6 +162,7 @@ typedef struct _MAPIUID #define MAPI_ACCESS_CREATE_HIERARCHY 0x00000008U #define MAPI_ACCESS_CREATE_CONTENTS 0x00000010U #define MAPI_ACCESS_CREATE_ASSOCIATED 0x00000020U +#define MAPI_USE_DEFAULT 0x00000040U #define MAPI_UNICODE 0x80000000U /* Strings in this call are Unicode */ #if defined (UNICODE) || defined (__WINESRC__) @@ -170,6 +171,9 @@ typedef struct _MAPIUID #define fMapiUnicode 0U #endif +/* IMAPISession::OpenMessageStore() flags */ +#define MDB_NO_DIALOG 0x00000001 + /* Types of message receivers */ #ifndef MAPI_ORIG #define MAPI_ORIG 0 /* The original author */
1
0
0
0
Owen Rudge : mapi32: Add stub of Extended MAPI wrapper for MAPISendMail.
by Alexandre Julliard
01 Oct '09
01 Oct '09
Module: wine Branch: master Commit: c528e9e8dc50dd4e1d1c8ddf5976da17dc4b45f6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c528e9e8dc50dd4e1d1c8ddf5…
Author: Owen Rudge <orudge(a)codeweavers.com> Date: Thu Oct 1 14:10:50 2009 +0100 mapi32: Add stub of Extended MAPI wrapper for MAPISendMail. --- dlls/mapi32/sendmail.c | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/dlls/mapi32/sendmail.c b/dlls/mapi32/sendmail.c index 5054be8..d98f8bf 100644 --- a/dlls/mapi32/sendmail.c +++ b/dlls/mapi32/sendmail.c @@ -38,6 +38,19 @@ WINE_DEFAULT_DEBUG_CHANNEL(mapi); +/* + Internal function to send a message via Extended MAPI. Wrapper around the Simple + MAPI function MAPISendMail. +*/ +static ULONG sendmail_extended_mapi(LHANDLE mapi_session, ULONG_PTR uiparam, lpMapiMessage message, + FLAGS flags, ULONG reserved) +{ + TRACE("Using Extended MAPI wrapper for MAPISendMail\n"); + + MAPIUninitialize(); + return MAPI_E_FAILURE; +} + /************************************************************************** * MAPISendMail (MAPI32.211) * @@ -80,8 +93,9 @@ ULONG WINAPI MAPISendMail( LHANDLE session, ULONG_PTR uiparam, if (mapiFunctions.MAPISendMail) return mapiFunctions.MAPISendMail(session, uiparam, message, flags, reserved); - /* TODO: Check if we have an Extended MAPI provider, if so, implement - wrapper around that. */ + /* Check if we have an Extended MAPI provider - if so, use our wrapper */ + if (MAPIInitialize(NULL) == S_OK) + return sendmail_extended_mapi(session, uiparam, message, flags, reserved); /* Fall back on our own implementation */ if (!message) return MAPI_E_FAILURE;
1
0
0
0
Aric Stewart : advapi32: Fill the PLSA_REFERENCED_DOMAIN_LIST parameters for LsaLookupNames2 and LsaLookupSids .
by Alexandre Julliard
01 Oct '09
01 Oct '09
Module: wine Branch: master Commit: 6308f40da7dd5cb6d0513149e7fb25b623f4cdb6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6308f40da7dd5cb6d0513149e…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Wed Sep 30 12:56:23 2009 -0500 advapi32: Fill the PLSA_REFERENCED_DOMAIN_LIST parameters for LsaLookupNames2 and LsaLookupSids. --- dlls/advapi32/lsa.c | 84 +++++++++++++++++++++++++++++++++++++++----- dlls/advapi32/tests/lsa.c | 8 ++-- 2 files changed, 78 insertions(+), 14 deletions(-) diff --git a/dlls/advapi32/lsa.c b/dlls/advapi32/lsa.c index a0a332e..b5dab21 100644 --- a/dlls/advapi32/lsa.c +++ b/dlls/advapi32/lsa.c @@ -33,6 +33,7 @@ #include "advapi32_misc.h" #include "wine/debug.h" +#include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(advapi); @@ -311,6 +312,39 @@ static BOOL lookup_name( LSA_UNICODE_STRING *name, SID *sid, DWORD *sid_size, WC return ret; } +static INT build_domain(PLSA_REFERENCED_DOMAIN_LIST currentList, PLSA_UNICODE_STRING domain) +{ + ULONG count; + ULONG sid_size = 0,domain_size = 0; + BOOL handled = FALSE; + SID_NAME_USE use; + + for (count = 0; count < currentList->Entries; count ++) + { + if ((currentList->Domains[count].Name.Length == domain->Length) && + (strncmpiW(currentList->Domains[count].Name.Buffer,domain->Buffer,(domain->Length / sizeof(WCHAR))) == 0)) + { + HeapFree(GetProcessHeap(),0,domain->Buffer); + return count; + } + } + + if (currentList->Entries > 0) + currentList->Domains = HeapReAlloc(GetProcessHeap(),0,currentList->Domains, (currentList->Entries + 1) * sizeof(LSA_TRUST_INFORMATION)); + else + currentList->Domains = HeapAlloc(GetProcessHeap(),0,sizeof(LSA_TRUST_INFORMATION)); + + currentList->Domains[currentList->Entries].Name = *domain; + + lookup_name( domain, NULL, &sid_size, NULL, &domain_size, &use, &handled ); + domain_size = 0; + currentList->Domains[currentList->Entries].Sid = HeapAlloc(GetProcessHeap(),0,sid_size); + lookup_name( domain, currentList->Domains[currentList->Entries].Sid, &sid_size, NULL, &domain_size, &use, &handled ); + + currentList->Entries++; + return currentList->Entries-1; +} + /****************************************************************************** * LsaLookupNames2 [ADVAPI32.@] * @@ -319,7 +353,7 @@ NTSTATUS WINAPI LsaLookupNames2( LSA_HANDLE policy, ULONG flags, ULONG count, PLSA_UNICODE_STRING names, PLSA_REFERENCED_DOMAIN_LIST *domains, PLSA_TRANSLATED_SID2 *sids ) { - ULONG i, sid_size_total = 0, domain_size_total = 0, size, num_domains; + ULONG i, sid_size_total = 0, domain_size_max = 0, size; ULONG sid_size, domain_size, mapped; BOOL ret, handled = FALSE; SID_NAME_USE use; @@ -327,7 +361,7 @@ NTSTATUS WINAPI LsaLookupNames2( LSA_HANDLE policy, ULONG flags, ULONG count, TRACE("(%p,0x%08x,0x%08x,%p,%p,%p)\n", policy, flags, count, names, domains, sids); - mapped = num_domains = 0; + mapped = 0; for (i = 0; i < count; i++) { handled = FALSE; @@ -338,9 +372,8 @@ NTSTATUS WINAPI LsaLookupNames2( LSA_HANDLE policy, ULONG flags, ULONG count, sid_size_total += sid_size; if (domain_size) { - FIXME("domain not handled\n"); - domain_size_total += domain_size; - num_domains++; + if (domain_size > domain_size_max) + domain_size_max = domain_size; } mapped++; } @@ -362,13 +395,20 @@ NTSTATUS WINAPI LsaLookupNames2( LSA_HANDLE policy, ULONG flags, ULONG count, for (i = 0; i < count; i++) { + LSA_UNICODE_STRING domain; + + domain.Length = domain_size_max*sizeof(WCHAR); + domain.MaximumLength = domain_size_max*sizeof(WCHAR); + domain.Buffer = HeapAlloc(GetProcessHeap(),0,domain.Length); + (*sids)[i].Use = SidTypeUnknown; (*sids)[i].DomainIndex = -1; (*sids)[i].Flags = 0; handled = FALSE; sid_size = sid_size_total; - ret = lookup_name( &names[i], sid, &sid_size, NULL, &domain_size, &use, &handled ); + domain_size = domain_size_max; + ret = lookup_name( &names[i], sid, &sid_size, domain.Buffer, &domain_size, &use, &handled ); if (handled) { (*sids)[i].Sid = sid; @@ -376,7 +416,16 @@ NTSTATUS WINAPI LsaLookupNames2( LSA_HANDLE policy, ULONG flags, ULONG count, sid += sid_size; sid_size_total -= sid_size; + if (domain_size) + { + domain.Length = domain_size * sizeof(WCHAR); + (*sids)[i].DomainIndex = build_domain(*domains, &domain); + } + else + HeapFree(GetProcessHeap(),0,domain.Buffer); } + else + HeapFree(GetProcessHeap(),0,domain.Buffer); } if (mapped == count) return STATUS_SUCCESS; @@ -436,16 +485,31 @@ NTSTATUS WINAPI LsaLookupSids( (*Names)[i].Name.Buffer = NULL; if (LookupAccountSidW(NULL, Sids[i], NULL, &name_size, NULL, &domain_size, &use)) { - if (domain_size) - FIXME("domains not handled\n"); + LSA_UNICODE_STRING domain; + mapped++; - domain_size = 0; + if (domain_size) + { + domain.Length = domain_size*sizeof(WCHAR); + domain.MaximumLength = domain_size*sizeof(WCHAR); + domain.Buffer = HeapAlloc(GetProcessHeap(),0,domain.Length); + } + else + { + domain.Length = 0; + domain.MaximumLength = 0; + domain.Buffer = NULL; + } + (*Names)[i].Use = use; (*Names)[i].Name.Length = name_size * sizeof(WCHAR); (*Names)[i].Name.MaximumLength = name_size * sizeof(WCHAR); (*Names)[i].Name.Buffer = HeapAlloc(GetProcessHeap(),0,name_size * sizeof(WCHAR)); - LookupAccountSidW(NULL, Sids[i], (*Names)[i].Name.Buffer, &name_size, NULL, &domain_size, &use); + LookupAccountSidW(NULL, Sids[i], (*Names)[i].Name.Buffer, &name_size, domain.Buffer, &domain_size, &use); + + if (domain_size) + (*Names)[i].DomainIndex = build_domain(*ReferencedDomains, &domain); } } TRACE("mapped %u out of %u\n",mapped,Count); diff --git a/dlls/advapi32/tests/lsa.c b/dlls/advapi32/tests/lsa.c index 991b06b..efb75bb 100644 --- a/dlls/advapi32/tests/lsa.c +++ b/dlls/advapi32/tests/lsa.c @@ -298,7 +298,7 @@ static void test_LsaLookupNames2(void) ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %x)\n", status); ok(sids[0].Use == SidTypeWellKnownGroup, "expected SidTypeWellKnownGroup, got %u\n", sids[0].Use); ok(sids[0].Flags == 0, "expected 0, got 0x%08x\n", sids[0].Flags); - todo_wine ok(domains->Entries == 1, "expected 1, got %u\n", domains->Entries); + ok(domains->Entries == 1, "expected 1, got %u\n", domains->Entries); get_sid_info(sids[0].Sid, &account, &sid_dom); ok(!strcmp(account, "LOCAL SERVICE"), "expected \"LOCAL SERVICE\", got \"%s\"\n", account); ok(!strcmp(sid_dom, "NT AUTHORITY"), "expected \"NT AUTHORITY\", got \"%s\"\n", sid_dom); @@ -323,7 +323,7 @@ static void test_LsaLookupNames2(void) ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %x)\n", status); ok(sids[0].Use == SidTypeWellKnownGroup, "expected SidTypeWellKnownGroup, got %u\n", sids[0].Use); ok(sids[0].Flags == 0, "expected 0, got 0x%08x\n", sids[0].Flags); - todo_wine ok(domains->Entries == 1, "expected 1, got %u\n", domains->Entries); + ok(domains->Entries == 1, "expected 1, got %u\n", domains->Entries); get_sid_info(sids[0].Sid, &account, &sid_dom); ok(!strcmp(account, "LOCAL SERVICE"), "expected \"LOCAL SERVICE\", got \"%s\"\n", account); ok(!strcmp(sid_dom, "NT AUTHORITY"), "expected \"NT AUTHORITY\", got \"%s\"\n", sid_dom); @@ -338,8 +338,8 @@ static void test_LsaLookupNames2(void) ok(sids[0].Use == SidTypeWellKnownGroup, "expected SidTypeWellKnownGroup, got %u\n", sids[0].Use); ok(sids[1].Use == SidTypeUnknown, "expected SidTypeUnknown, got %u\n", sids[0].Use); ok(sids[2].Use == SidTypeWellKnownGroup, "expected SidTypeWellKnownGroup, got %u\n", sids[0].Use); - todo_wine ok(sids[0].DomainIndex == 0, "expected 0, got %u\n", sids[0].DomainIndex); - todo_wine ok(domains->Entries == 1, "expected 1, got %u\n", domains->Entries); + ok(sids[0].DomainIndex == 0, "expected 0, got %u\n", sids[0].DomainIndex); + ok(domains->Entries == 1, "expected 1, got %u\n", domains->Entries); pLsaFreeMemory(sids); pLsaFreeMemory(domains);
1
0
0
0
Rico Schüller : d3d10: Remove double declared variable in parse_fx10_variable().
by Alexandre Julliard
01 Oct '09
01 Oct '09
Module: wine Branch: master Commit: 6f2ad697181df9cc015e4ebbd78837077175eba5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6f2ad697181df9cc015e4ebbd…
Author: Rico Schüller <kgbricola(a)web.de> Date: Thu Oct 1 11:56:01 2009 +0200 d3d10: Remove double declared variable in parse_fx10_variable(). --- dlls/d3d10/effect.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index a167a11..b41daeb 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -790,10 +790,9 @@ static HRESULT parse_fx10_variable(struct d3d10_effect_variable *v, const char * return E_OUTOFMEMORY; } - for(i = 0; i < v->annotation_count; ++i) + for (i = 0; i < v->annotation_count; ++i) { struct d3d10_effect_variable *a = &v->annotations[i]; - HRESULT hr; a->effect = v->effect;
1
0
0
0
← Newer
1
...
113
114
115
116
117
118
119
120
121
Older →
Jump to page:
1
2
3
4
5
6
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
Results per page:
10
25
50
100
200