|
Hi all,
Its been long but I am back with another puzzling question...
Does anybody who has worked on ADSI can help me out to read 'User must change password at next logon' using LDAP. I do know how to set the values by using 'pwdlastset' but I am not able to search for a way to read it.
Can somebody throw a light on it.
-Kushagra
|
|
|
|
|
I dont know the exact answer to your question, usually I use a tool like http://ldaptool.sourceforge.net/[^] to browse for attributes and view them, then try and read the attribute once I know what Im looking for/at
If you dont have such, use that or search for [LDAP Explorer] for example
'g'
|
|
|
|
|
that doesnot help me out... as I am working on ADSI and using LDAP just for authentication..
|
|
|
|
|
|
Finally I was able to figure this stuff out...
Check this out: http://msdn.microsoft.com/en-us/library/ms974598.aspx
We will have to query for 'PasswordLastChanged' and if it fails with error code E_ADS_PROPERTY_NOTFOUND , then we have the password option set as 'User must change password at next logon'.
Hope this helps someone in future.
-Kushagra
|
|
|
|
|
Continued from http://www.codeproject.com/Messages/3565121/help-needed-about-help.aspx
If s is a char* -type variable containing the name of a *.chm-type file, please how do I call it as a help file?
With the old help I used a format like:
case _HELP_: WinHelp(wn,PROGNAME".HLP",HELP_CONTENTS,0); goto DEF;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A link in that earlier thread led me to an application that can decompile .HLP files into .RTF files. Thanks.
I still have an old help-maker called HELPGEN that translates from its scripting input language to .RTF and then separately from .RTF to .HLP .
Please, where is a simple-to-use application which can translate from such .RTF's to .CHM ?
|
|
|
|
|
According to MSDN, how about:
case _HELP_: HtmlHelp(wn, s, HH_DISPLAY_TOC, (DWORD_PTR)NULL);
Also see Google: Converting WinHelp HtmlHelp. Hope this helps
/M
|
|
|
|
|
Can you use ShellExecute() ?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
When you are in the MFC context :
CYourApp::CYourApp()
{
EnableHtmlHelp();
}
BEGIN_MESSAGE_MAP(CYourApp, CWinApp)
ON_COMMAND(ID_HELP, OnHelp)
END_MESSAGE_MAP()
BOOL CYourApp::InitInstance()
{
...
CString cszHelpFile(_T("C:\\test.chm"));
m_pszHelpFilePath = _tcsdup(cszHelpFile);
...
}
#define HLP_INDEX 0 // index of the desired page
void CYourApp::OnHelp()
{
HtmlHelp(HLP_INDEX, HH_HELP_CONTEXT);
}
Use also: /*virtual*/ void CWnd::HtmlHelp(DWORD_PTR dwData, UINT nCmd /*= 0x000F*/)
virtual void BeHappy() = 0;
|
|
|
|
|
PROGNAME".HLP" isnt a proper string so it doesnt work
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
#define PROGNAME "myapp"
makes it a proper string
|
|
|
|
|
you guys are so evil
|
|
|
|
|
Jedi stuff. Don't try it at home...
|
|
|
|
|
Actually,
#define PROGNAME "myapp"
#define HELPFILE PROGNAME##".hlp"
const TCHAR *helpFileName = HELPFILE;
that works.
|
|
|
|
|
Actually, actually , the last two lines you added does not affect
PROGNAME".HLP" at all.
|
|
|
|
|
Well duh.
The intention was to illustrate how one could accomplish that effect of token pasting correctly. I guess you missed it.
|
|
|
|
|
Sorry mate!
I was reading "that works" as if my reply didn't.
|
|
|
|
|
Hello everyone !
The test dialog will showing ,when the mouse double clicked on the MDIView.
Now I want to get the CMDIView's pointer in test dialog member function,and then to call "CMDIView::OnDraw" to update the windows.
the code like this:
/////////////////////////////////////////////////////////////////
// MDIView.h
#include "TestDlg.h"
class CMDIView : public CView
{
public:
CTestDlg *m_pTestDlg;
CWnd *m_pWnd;
}
CMDIView::CMDIView()
{
m_pTestDlg = new CTestDlg();
m_pTestDlg.Create(IDD_TEST_DLG,this);
m_pTestDlg.ShowWindow(SW_HIDE);
m_pTestDlg.UpdateWindow();
}
void CMDIView::OnLButtonDblClk(UINT nFlags, CPoint point)
{
m_pTestDlg.InitDlg("Hello",this);
m_pTestDlg.ShowWindow(SW_SHOWNORMAL);
}
CMDIView::OnDraw(CDC *pDC)
{
//Here will get the document pointer to draw the element.
GetDocument()->DrawAllItem(..);
}
// MDIView.h over.
/////////////////////////////////////////////////////////////////
now here is the dialog's member function:
/////////////////////////////////////////////////////////////////
class CTestDlg : public CDialog
{
public:
CWnd *m_pWnd;
//......
}
CTestDlg::InitDlg(CString strTitle,CWnd *pWnd)
{
SetWindowText(strTitle);
m_pWnd = pWnd;
ASSERT( m_pWnd != NULL);
}
void CTestDlg::OnBtnEdit()
{
//Now I want to get the CMDIView's pointer,and then to call CMDIView::OnDraw
//Then how to write?
......
}
I try to use this way ,but failed too,please help me...
m_pWnd->Invalidate();
m_pWnd->UpdateData(FALSE);
Thanks for you reply !
Best Regards !
|
|
|
|
|
Just set the parent in the dialog construction :
class A;
class B
{
A* m_pA;
public:
B(A* pA) { m_pA = pA; }
bool TestParent() {
if (m_pA) m_pA->CallMe();
return (NULL != m_pA);
}
};
class A
{
B* m_pB;
public:
A() { m_pB = new B(this); }
~A() { if (m_pB) delete m_pB; }
void CallMe() {}
};
virtual void BeHappy() = 0;
|
|
|
|
|
I know the mean.
Thank you !
|
|
|
|
|
Hi all,
I'm using Visual Studio 2005 with MFC application. Is there a coding method to obtain Application Window's handle and rect with a mouse click?
Let's say I have a transparent window with WS_EX_TOPMOST attribute and there are other window applications such as Microsoft Word, Mozilla Firefox and Window Explorer. I was told to obtain the rect and the handle of the window application with a mouse click while the transparent window on TOPMOST.
Example:
I click on Mozilla Firefox while all other windows are opened and on top of mozilla and yet the transparent window is on TOPMOST of all. How do I obtain the RECT as well as the handle??
By the way, I'm trying to BitBlt that Mozilla with a mouse click with all window including my own created MFC window on top of it.
You smile at me and I smile at you,
And so one smile makes two~
|
|
|
|
|
I think EnumWindows and GetWindowRect functions can be used.
|
|
|
|
|
Thanks for the reply. Even though I can get handles from there. How do I actual press with my mouse to get the coordinate (POINT) on any position of the Window Application to obtain corresponding handle of that Window Application since I got a transparent window at TOPMOST and other Window Applications before it?
To code or not to code, that is the question~
|
|
|
|
|
Hi,
I am using GDIplus library in my project to draw images etc.
Gdiplus is the part of windows so initially I planned not to give this library with application. But I got complain that application is trowing some error saying "application failed to initialized properly.."
If I place the gdiplus.dll with application then this problem will not come.
If gdiplus is part of window why shell I packed this with my application?
|
|
|
|
|
There are 2 versions of GDI+ .
GDI+ 1.0 comes with Windows XP and can be redistributed to older version of Windows.
GDI+ 1.1 comes with Windows Vista and later, and you cannot legally redistribute it.
According to MS if you are using GDI+ 1.0 your code should work on any machine that has this version or higher.
For additional information refer to this[^] MSDN thread.
|
|
|
|