|
If a statically-allocated array is acceptable, you can do:
aaa stuff[] = { aaa(2), aaa(2), aaa(2), aaa(2), aaa(2) };
|
|
|
|
|
Hi,
I am using IADS component to query about the user information from a local machine.
Sometimes, When i call ADsGetObject method, it takes more time to query about the user. But some times it happens quick.
I am querying about an user who is created in the local machine.
What is the reason for this? How can i solve this problem.
Any help would be very much appreciated.
Thanks.
Selva
|
|
|
|
|
Hi,
I want to write some application that looking some file name ( "file.exe" or *.exe ) on the entire disk.
Can some one help me ?
|
|
|
|
|
Some please can help me with this one ?
|
|
|
|
|
Hi,
There are two APIs for searching a folder
FindFirstFile & FindNextFile
or there is an MFC Class CFileFind, which is almost like a wrapper to above mentioned APIs. you can go through the documents of these APIs.
bye
P.Somasundaram
|
|
|
|
|
|
You can use of FindFirstFile/FindNextFile I was working with them it easy if you declare their on a thread is good.
|
|
|
|
|
can any body help me??
LRESULT CALLBACK WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
i'm trying to convert this c++ code into vb 6.0 can i?, any recommendation for the message sending function i should use in vb?
thx
|
|
|
|
|
having problems with "unbolded" text ??
moreover, if you needed help on VB specific, you'd better ask the VB forum (unless you have a specific C/C++ question ?)...
|
|
|
|
|
That's a mighty BOLD question for a C++ forum
|
|
|
|
|
Hi !!!
I am initialize text and retriving it on dialog box..My code is like..
CDialog::OnInitDialog();
m_ExchListbox.AddString(_T("Exchanger-Double end"));
m_ExchListbox.AddString(_T("Exchanger-Single end"));
m_ExchListbox.AddString(_T("Exchanger-Double end kettle"));
m_ExchListbox.AddString(_T("Exchanger-Single end kettle"));
m_ExchListbox.AddString(_T("Exchanger-Super"));
m_ExchListbox.AddString(_T("Exchanger-Process Flow"));
m_ExchListbox.SetCurSel(0);
n out put of the dialog box is not same as what i declred..ie the out put is like..
Exchanger-Double end
Exchanger-Double end kettle
Exchanger-Process Flow
Exchanger-Super
Exchanger-Single end
Exchanger-Single end kettle
ie i want out put as same as i declred.. ie first should be Exchanger-Double end and last should be Exchanger-Process Flow..I dont want alphabetically character out put..
Thanking you
Shah Satish
Shah Satish
|
|
|
|
|
In the dialog editor, right-click on your listbox and search in the settings. There should be an option to sort the list. Uncheck the check box 'Sort'.
|
|
|
|
|
|
Mr satish,
I already told you that when you have to post code, you have to use the <pre></pre> tags around your pieces of code !
please edit your message consequently
ps: edit means reuse the same message and modifying it, without reposting a new message (have you noticed the little [Modify] link at the bottom of your post ?).
as we are on a forum, it also implies that you share with us on the boards, instead of mailing me your modifications...
|
|
|
|
|
Sorry dear..I forgot it..
Shah
|
|
|
|
|
ListBox and ComboBox has a option on the property window that is sort you can set it to true or false
|
|
|
|
|
Good day to you all!
I created an application having a spin control(vertical scrollbar) attached to an edit box. I needed the application to increment/decrement by 0.01 everytime the scrollbar is pressed. Later on I found out that the default increment is set to 1. What should I do so that the increment would be set to 0.01 and also the display in the edit box having two decimal places?
Thank you very much for the help and time!
|
|
|
|
|
Huh?
I've never seen a spin control or scrollbar implementation that used floating point.
Why not set the range to range*100 and anytime you display the position use position/100 ?
Mark
|
|
|
|
|
Yes that was what I was planning to do. I just wanted to confirm if there was a possibility of using float/double inside the spin control.
Thank you for the help!
|
|
|
|
|
Hello,
I have developed a Channel File that is distributed using an installation file. In order to install the File on the active desktop I use a small C++ application which does the following:
ShellExecute(NULL, NULL, activedesktop.cdf, "", "", SW_NORMAL);
When I tested on several machines on some XP it works just fine and on other it does not show the Add Item to Active Desktop dialog.
If someone has experience with the Active Desktop I would appreciate a suggestion.
Thanks, Dan.
|
|
|
|
|
Hello,
I have managed to find the solution. For anyone interested this is it:
bool InstallActiveDesktop()<br />
{<br />
COMPONENT component;<br />
COMPPOS comppos;<br />
CoInitialize(NULL);<br />
HRESULT hr;<br />
IActiveDesktop *pActiveDesktop;<br />
hr = CoCreateInstance(CLSID_ActiveDesktop, NULL, CLSCTX_INPROC_SERVER,<br />
IID_IActiveDesktop, (void**)&pActiveDesktop);<br />
ZeroMemory(&component, sizeof(COMPONENT));<br />
component.dwSize = sizeof(COMPONENT);<br />
component.iComponentType = COMP_TYPE_WEBSITE;<br />
component.fChecked = TRUE;<br />
component.fDirty = TRUE;<br />
component.fNoScroll = TRUE;<br />
comppos.dwHeight = 400;<br />
comppos.dwSize = sizeof(COMPPOS);<br />
comppos.dwWidth = 165;<br />
comppos.fCanResize = TRUE;<br />
comppos.fCanResizeX = TRUE;<br />
comppos.fCanResizeY = TRUE;<br />
comppos.iLeft = 400;<br />
comppos.iTop = 20;<br />
comppos.izIndex = 0;<br />
component.cpPos = comppos;<br />
MultiByteToWideChar(CP_ACP, 0, "FriendlyName",<br />
strlen("FriendlyName")+1, <br />
component.wszFriendlyName, sizeof(component.wszFriendlyName));<br />
MultiByteToWideChar(CP_ACP, 0, "http://www.complete.link",<br />
strlen("http://www.complete.link")+1, <br />
component.wszSource, sizeof(component.wszFriendlyName));<br />
component.dwCurItemState = IS_NORMAL;<br />
pActiveDesktop->AddDesktopItem(&component, 0);<br />
pActiveDesktop->ApplyChanges(AD_APPLY_ALL);<br />
pActiveDesktop->Release();<br />
CoUninitialize();<br />
return true; <br />
}<br />
bool UnInstallActiveDesktop()<br />
{<br />
COMPONENT component;<br />
COMPPOS comppos;<br />
CoInitialize(NULL);<br />
HRESULT hr;<br />
IActiveDesktop *pActiveDesktop;<br />
hr = CoCreateInstance(CLSID_ActiveDesktop, NULL, CLSCTX_INPROC_SERVER,<br />
IID_IActiveDesktop, (void**)&pActiveDesktop);<br />
ZeroMemory(&component, sizeof(COMPONENT));<br />
component.dwSize = sizeof(COMPONENT);<br />
component.iComponentType = COMP_TYPE_WEBSITE;<br />
component.fChecked = TRUE;<br />
component.fDirty = TRUE;<br />
component.fNoScroll = TRUE;<br />
comppos.dwHeight = 400;<br />
comppos.dwSize = sizeof(COMPPOS);<br />
comppos.dwWidth = 165;<br />
comppos.fCanResize = TRUE;<br />
comppos.fCanResizeX = TRUE;<br />
comppos.fCanResizeY = TRUE;<br />
comppos.iLeft = 100;<br />
comppos.iTop = 20;<br />
comppos.izIndex = 0;<br />
component.cpPos = comppos;<br />
MultiByteToWideChar(CP_ACP, 0, "FriendlyName",<br />
strlen("FriendlyName")+1, <br />
component.wszFriendlyName, sizeof(component.wszFriendlyName));<br />
MultiByteToWideChar(CP_ACP, 0, "http://www.complete.link",<br />
strlen("http://www.complete.link")+1, <br />
component.wszSource, sizeof(component.wszFriendlyName));<br />
component.dwCurItemState = IS_NORMAL;<br />
pActiveDesktop->RemoveDesktopItem(&component, 0);<br />
pActiveDesktop->ApplyChanges(AD_APPLY_ALL);<br />
pActiveDesktop->Release();<br />
CoUninitialize();<br />
return true; <br />
}
|
|
|
|
|
Hi to All,
I m writing a code to send mail from my smtp server to othres. for this purpose i want to aunthenticate my smtp server with username and password.
Please tell me how can i authenticate my server.
i m trying like this.
User = "sulabh" ;
nUser = Encode(user); // base64 encoding
Pwd = "123456";
nPwd = Encode(Pwd);
CString str;
str.Format("%s""%s""%s""%s", NULL, nUser, NULL, nPwd);//Is it right Format???
Nstr = Encode(str);
sHello.Format( "EHLO %s\r\n", local_host );
m_wsSMTPServer.Send( (LPCTSTR)sHello, sHello.GetLength() ); /////////WORK FINE
nHello.Format( "AUTH %s\r\n", Nstr );
m_wsSMTPServer.Send( (LPCTSTR)nHello, nHello.GetLength() ); ///// ///RETURN AUTHENTICATION FAILED
Please tell me the right way to do this
Thanks in Adavace
|
|
|
|
|
I think u use AUTH command incorrectly.
AUTH cmd has parameter of Authentication type e.g CRAM-MD5 which is supported by server
Following example will clarify this : [C : Client S: Server]
C: EHLO jgm.example.com
S: 250-smtp.example.com
S: 250 AUTH CRAM-MD5 DIGEST-MD5
C: AUTH FOOBAR
S: 504 Unrecognized authentication type.
C: AUTH CRAM-MD5
S: 334
PENCeUxFREJoU0NnbmhNWitOMjNGNndAZWx3b29kLmlubm9zb2Z0LmNvbT4=
C: ZnJlZCA5ZTk1YWVlMDljNDBhZjJiODRhMGMyYjNiYmFlNzg2ZQ==
S: 235 Authentication successful.
Hope this will useful to u ...
|
|
|
|
|
yes i tried this but i did'nt get 235 as a reponse
when i give command EHLO
then i got
250-cm-ms5.globat.com
250-PIPELINING
250-SIZE 655360000
250-ETRN
250-STARTTLS
250-AUTH DIGEST-MD5 CRAM-MD5 LOGIN PLAIN
250-AUTH=DIGEST-MD5 CRAM-MD5 LOGIN PLAIN
250 8BITMIME
after this i issue AUTH CRAM-MD5
i get 334 PENCeUxFREJoU0NnbmhNWitOMjNGNndAZWx3b29kLmlubm9zb2Z0LmNvbT4=
But when i send user name and passward i get again 334 with some value like above
what should i do to get 235
Thanks again
|
|
|
|
|
I have a MFC Dll project in Visual C6 and use CAsyncSocket class in my project.
in wizars forms set "windows socket" checkbox, I get a object from CAsyncsocket and create this, I export function , when use this function in delphi or other programming language I have get one error.
I debug my Dll and see occur error in myCasySocket.create() line.
void CreateMySocket()
{
CAsyncSocket myCasySocket;
myCasySocket.create(); // << when in line run in DLL occured Error
}
Thanks,
Hamed ral.
|
|
|
|