|
commented out #import
Tnanks
|
|
|
|
|
Hi,
i am working for windows 8 wrapped credential provider .i did every thing in document which is provided by Microsoft .i implemented ICredentialProviderCredential2 interface with GetUserSid(__deref_out PWSTR *ppszSid) method,i am able to get sid .but my credential provider showing like other user tile ,but widows default credential showing password text box only,why my credential showing username text box and password text box. please help about this
Thanks
modified 24-Jul-13 4:55am.
|
|
|
|
|
Hi
I have developed Window service in .Net 2010 and in that windows service we are using Word COM object to covert DOC to PRN file.
if i run the window service in my local its working fine, but if i deploy the window service in Server 2008 R2 server i am getting below mentioned error, (Server 2008 R2 server Word 2003 is installed)
There is insufficient memory. Save the document now. (C:\...\ACL-PhillipSholar_1482.doc)
source Microsoft Word [System.Runtime.InteropServices.COMException]
at Word.Documents.Open(Object& FileName, Object& ConfirmConversions, Object& ReadOnly, Object& AddToRecentFiles, Object& PasswordDocument, Object& PasswordTemplate, Object& Revert, Object& WritePasswordDocument, Object& WritePasswordTemplate, Object& Format, Object& Encoding, Object& Visible, Object& OpenAndRepair, Object& DocumentDirection, Object& NoEncodingDialog, Object& XMLTransform)
If any one know how to resolve the issue, Please let me share your fix.
Regards,
Ganesan. B
|
|
|
|
|
hi,
in my dll i am calling win32 dialog with custom control it working in 32 bit windows 8 machine but it is not display in 64 bit windows 8 machine. anyone tell me solution .
Thanks
|
|
|
|
|
You will need to provide a lot more detail if you want assistance with this.
Use the best guess
|
|
|
|
|
my dll is custom credential provider .this dll provide a link in windows logon screen,this link will display win32 dialog with custom control.this is working for windows 7 32&64 bit and windows 8 32bit.but 64 bit windows 8 every thing is coming fine dialog only not displaying .
Thanks
|
|
|
|
|
venkatesh52867 wrote: dialog only not displaying . Well that's the second time you have told us that, but without a lot more information it's anyone's guess what is happening.
Use the best guess
|
|
|
|
|
Hi,
i have implemented two interfaces in
class CSampleProvider : public ICredentialProvider,public ICredentialProviderSetUserArray
{
....
STDMETHOD (QueryInterface)(REFIID riid, void** ppv)
{
HRESULT hr;
if (IID_IUnknown == riid ||
IID_ICredentialProvider == riid || IID_ICredentialProviderSetUserArray )
{
*ppv = this;
reinterpret_cast<IUnknown*>(*ppv)->AddRef();
hr = S_OK;
}
else
{
*ppv = NULL;
hr = E_NOINTERFACE;
}
return hr;
}
........
};
it is building with out errors .but when i execute dll logonui is
crashing .how can implement two interfaces in one class please help me
|
|
|
|
|
venkatesh52867 wrote: but when i execute dll logonui is crashing You need to trace to the point of the error and show the code that crashes and the reason.
Use the best guess
|
|
|
|
|
Hi,
Problem is this
|| IID_ICredentialProviderSetUserArray when i call IID_ICredentialProviderSetUserArray interface through Quareyinterface dll is crashing without implementing ICredentialProviderSetUserArray interface dll is working is fine .
thanks
modified 19-Jun-13 7:21am.
|
|
|
|
|
I'm sorry, but no one can guess what your code is doing to cause the crash. As I said before, use your debugger to trace through it and identify exactly what is happening.
Use the best guess
|
|
|
|
|
Hi,
please check this code.i am highlighted with bold that code add then it is crashing.
#pragma once
#include <credentialprovider.h>
#include <windows.h>
#include <strsafe.h>
#include "PasswordResetCredential.h"
#include "helpers.h"
class CSampleProvider : public ICredentialProvider,public ICredentialProviderSetUserArray
{
public:
// IUnknown
STDMETHOD_(ULONG, AddRef)()
{
return _cRef++;
}
STDMETHOD_(ULONG, Release)()
{
LONG cRef = _cRef--;
if (!cRef)
{
delete this;
}
return cRef;
}
STDMETHOD (QueryInterface)(REFIID riid, void** ppv)
{
HRESULT hr;
if (IID_IUnknown == riid ||
IID_ICredentialProvider == riid ||IID_ICredentialProviderSetUserArray==riid)
{
*ppv = this;
reinterpret_cast<iunknown*>(*ppv)->AddRef();
hr = S_OK;
}
else
{
*ppv = NULL;
hr = E_NOINTERFACE;
}
return hr;
}
public:
IFACEMETHODIMP SetUsageScenario(CREDENTIAL_PROVIDER_USAGE_SCENARIO cpus, DWORD dwFlags);
IFACEMETHODIMP SetSerialization(const CREDENTIAL_PROVIDER_CREDENTIAL_SERIALIZATION* pcpcs);
IFACEMETHODIMP Advise(__in ICredentialProviderEvents* pcpe, UINT_PTR upAdviseContext);
IFACEMETHODIMP UnAdvise();
IFACEMETHODIMP GetFieldDescriptorCount(__out DWORD* pdwCount);
IFACEMETHODIMP GetFieldDescriptorAt(DWORD dwIndex, __deref_out CREDENTIAL_PROVIDER_FIELD_DESCRIPTOR** ppcpfd);
IFACEMETHODIMP GetCredentialCount(__out DWORD* pdwCount,
__out DWORD* pdwDefault,
__out BOOL* pbAutoLogonWithDefault);
IFACEMETHODIMP GetCredentialAt(DWORD dwIndex,
__out ICredentialProviderCredential** ppcpc);
IFACEMETHODIMP SetUserArray (__in ICredentialProviderUserArray * users);
friend HRESULT CSampleProvider_CreateInstance(REFIID riid, __deref_out void** ppv);
protected:
CSampleProvider();
__override ~CSampleProvider();
private:
void _CleanUpAllCredentials();
private:
LONG _cRef;
CSampleCredential **_rgpCredentials; // Pointers to the credentials which will be enumerated by this
// Provider.
ICredentialProvider *_pWrappedProvider; // Our wrapped provider.
DWORD _dwCredentialCount; // The number of credentials provided by our wrapped provider.
DWORD _dwWrappedDescriptorCount; // The number of fields on each tile of our wrapped provider's
// credentials.
bool _bEnumeratedSetSerialization;
ICredentialProviderUserArray* _pCredProviderUserArray;
};
modified 19-Jun-13 10:45am.
|
|
|
|
|
Please format your code properly between <pre> tags, like:
STDMETHOD_(ULONG, Release)()
{
LONG cRef = _cRef--;
if (!cRef)
{
delete this;
}
return cRef;
}
Use the best guess
|
|
|
|
|
if (IID_IUnknown == riid ||
IID_ICredentialProvider == riid ||
IID_ICredentialProviderSetUserArray)
{
Do you see something missing here?
Use the best guess
|
|
|
|
|
hi,
ok but that is not problem when i called ICredentialProviderSetUserArray ==riid probblem is occurring
if (IID_IUnknown == riid ||
IID_ICredentialProvider == riid ||
IID_ICredentialProviderSetUserArray ==riid)
{
Thanks
|
|
|
|
|
You really need to do this[^]. Without a lot more information about what is actually happening at the time of the crash it's anyone's guess.
Use the best guess
|
|
|
|
|
Richard, Venkatesh
Are you certain that the old object is not getting out of scope when you create new. When you create multiple objects, chances are that you are not maintaining reference counts correctly so there is a small chance that object is actually removed or marked for removal when client attempts to access ...
As Richard quotes, this is my best guess 
|
|
|
|
|
It's been over a month; one can only assume OP fixed their code.
Use the best guess
|
|
|
|
|
The issue might lie in this statement:
*ppv = this;
Because you use a C-cast to type void*, type information is lost. The pointer does not point to the correct virtual table of the interface that you want to return.
Try the following instead:
STDMETHOD (QueryInterface)(REFIID riid, void** ppv)
{
HRESULT hr;
if (IID_ICredentialProviderSetUserArray == riid)
{
*ppv = dynamic_cast<ICredentialProviderSetUserArray>( this );
reinterpret_cast<IUnknown*>(*ppv)->AddRef();
hr = S_OK;
}
else if (IID_IUnknown == riid ||
IID_ICredentialProvider == riid )
{
*ppv = dynamic_cast<ICredentialProvider>( this );
reinterpret_cast<IUnknown*>(*ppv)->AddRef();
hr = S_OK;
}
else
{
*ppv = NULL;
hr = E_NOINTERFACE;
}
return hr;
}
|
|
|
|
|
If you have a C++ class
class Z : public X, public Y
{
}; then you may be surprised to find that
this is not a pointer to Y. Basic C++.
But
static_cast<Y>(this) is.
You need a separate
if(riid == IID_...){...}
for each IID
|
|
|
|
|
Hello mates,
i am tring to type special characters of spanish language using Code page 858 on DOS, but it is not coming,so if anybody know these concepts,kindly help
Thanks,great day
Harry
software Engg
|
|
|
|
|
I need to invoke functions of the Microsoft Office Protector (OpcIrmProtector) from C#. This protector implements the I_IrmProtector interface (details: http://msdn.microsoft.com/en-us/library/ms475158%28v=office.14%29.aspx[^]). Calling HrInit() is no problem.
But for e.g. HrIsProtected() I need to provide an implementation of ILockBytes . Has anybody experience how to correctly implement ILockBytes in managed code? I am a bit at a loss as to what is expected here.
For unmanaged code I found a sample that uses CreateILockBytesOnHGlobal() . This returns an unmanaged instance of ILockBytes . Is there any chance of using this unmanaged instance from managed code (probably not...) or marshalling it into a managed structure? Or is there a similar method for C#? In that case I wouldn't have to implement ILockBytes , which would save me a lot of time.
Of course, I could implement this part in unmanaged code, but I'd prefer a solution in managed code, if possible...
Thank you!
|
|
|
|
|
hi,
i have to implement one method to get all domain names from adsi forest in c++ anyone tell that how can do that in c++.
thanks
|
|
|
|
|
When I call with ATDxxxx; on Port 16: "Mobile Connect - PC UI Interface"
It connect but audio stream in Port 18: "Mobile Connect - Application Interface"
How to redirect audio stream in/out the serial port 18?
Please help!

|
|
|
|
|
Wrong forum. This is not for Hardware comms.
Component Object Model (COM)
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan
That's what machines are for.
Got a problem?
Sleep on it.
|
|
|
|