|
i did put the code in my question can u plz do the changes wht ur saying in tat code.
thanks.
|
|
|
|
|
At least try to understand what he said before asking him to write an entire program for you.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Thanks for advise.
Always welcome.
|
|
|
|
|
|
Itz urgent?
For instance you need to replace the following line
narodachintoo@yahoo.com wrote: m_listctrl.InsertItem(dwEntry++,(LPCTSTR) pServerInfo->sv101_name);
with:
#ifndef _UNICODE
const int SIZE = 0x100;
char szName[SIZE];
int wlen = wcslen(pServerInfo->sv101_name);
WideCharToMultiByte(CP_ACP, 0, pServerInfo->sv101_name, wlen , szName, SIZE, NULL, NULL);
m_listctrl.InsertItem(dwEntry++,(LPCTSTR) szName);
#else
m_listctrl.InsertItem(dwEntry++,(LPCTSTR) pServerInfo->sv101_name);
#endif
BTW error handling left to the reader.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Thanks for ur immidiate replay m in middle of some appli and this is another issue so m not able to spend much time behind R&D so...
by the way ur code gives some errors.
wcslen' : cannot convert parameter 1 from 'char *' to 'const unsigned short *'
'WideCharToMultiByte' : cannot convert parameter 3 from 'char *' to 'const unsigned short *'
|
|
|
|
|
The error message is in bold contrast with SERVER_INFO_101 definition. Could you post, please full code?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
LPSERVER_INFO_101 pServerInfo = NULL,pBuffer = NULL;
DWORD dwEntry = 0,dwEntriesRead,dwTotalEntries;
NET_API_STATUS nStatus;
CString str;
nStatus = NetServerEnum(NULL,
101,
(LPBYTE *) &pBuffer,
MAX_PREFERRED_LENGTH,
&dwEntriesRead,
&dwTotalEntries,
SV_TYPE_ALL,
NULL,
0);
int i=0;
if(nStatus == ERROR_SUCCESS)
{
pServerInfo = pBuffer;
while (dwEntriesRead--)
{
#ifndef _UNICODE
const int SIZE = 0x100;
char szName[SIZE];
int wlen = wcslen(pServerInfo->sv101_name);
WideCharToMultiByte(CP_ACP, 0, pServerInfo->sv101_name, wlen , szName, SIZE, NULL, NULL);
m_listctrl.InsertItem(dwEntry++,(LPCTSTR) szName);
#else
m_listctrl.InsertItem(dwEntry++,(LPCTSTR) pServerInfo->sv101_name);
#endif
this is the full code and thanks for ur immidiate resopnses.
the same which m trying is working fine in c#.net now.
|
|
|
|
|
What is your platform (the operative system of your machine)?
Try (just a guess-based attempt, don't balem me if it doesn't work) to change the following lines
narodachintoo@yahoo.com wrote: nt wlen = wcslen(pServerInfo->sv101_name);
WideCharToMultiByte(CP_ACP, 0, pServerInfo->sv101_name, wlen , szName, SIZE, NULL, NULL);
with
int wlen = wcslen((LPWSTR)pServerInfo->sv101_name);
WideCharToMultiByte(CP_ACP, 0, (LPWSTR)(pServerInfo->sv101_name), wlen , szName, SIZE, NULL, NULL);
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
cooool
its working
thanks.
no blaming yaar u r helping me.
|
|
|
|
|
Hi EveryOne,
I am doing project on GSM modem to send and receive message.I want to use existing dll file for example(comdlg32.dll).Please tell me how shall i use that in my program.please tell me procedure.
it is urgent.Help me.
Regards,
savitri
|
|
|
|
|
Import the functions from your executable and use it as if it were a local function. Have a look at LoadLibrary() , GetProcAddress() . You will get started then.
savitri wrote: it is urgent
Almost all your questions are urgent. But unfortunately, you will get your query resolved only if you follow the guidelines[^] while asking a query.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
The simplest way to use such DLL s is via load time linking:
Add the corrensponding import library as linker input: select Project->Properties menu item, then Configuration Properties->Linker node and add, for instance, comdlg32.lib to Additional Dependecies line.
Usually you have also to include the library header file in you project (it is not the case of comdlg32.dll : windows.h is enough) and make sure that loader is able to find the DLL at runtime (again nothing to do for comdlg32.dll , since it is already in the loader search path).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
hi pallini,
in project menu settings option is there.no propertise option is there.please tell me clearly.wer i have to configure that dll.actually i downloaded one software.with that one dll called lcgsmSMS.dll is there.I want to use this dll in my program please tell me.
Please help me.
THANKS IN ADVANCE,
savitri
|
|
|
|
|
Are you using Visual Studio (which version?)?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Microsoft visual studio 6.0
please tell me.
|
|
|
|
|
Here [^] an example.
BTW Have you the library header file (*.h ) and the import one (*.lib )?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Hi Palnili,
May I ask a question?
|
|
|
|
|
Hamid. wrote: Hi Palnili
Actually is Pallini.
Hamid. wrote: May I ask a question?
Of course. I'm waiting for.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Oh Im sorry I must be paste your name.
Do you know Mr Antonio Vivaldi? I had a music of him and I like it a lot but I losed it,do you have this music(I think its four reasons)?
|
|
|
|
|
Hamid. wrote: Do you know Mr Antonio Vivaldi?
Well, not personally!
Hamid. wrote: I had a music of him and I like it a lot but I losed it,do you have this music(I think its four reasons)?
I think it was the four seasons, (orginal title: "le quattro stagioni").
I don't remeber if I have it, since Vivaldi is not my favourite composer (I like very much Verdi and Bach). I will look for at home.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Well he was born in Venis in Italy(1678-1741),I read his biography.You like Monte Verdi(1567-1643),right? I heared and know most harmonist of occident,because I am musician (at the day I am a programmer and at the night a player ),btw Im thankful of your search.
|
|
|
|
|
Hamid. wrote: You like Monte Verdi(1567-1643),right?
Nope. I like Giuseppe Verdi[^], I think he was the best Italian composer (I like so much the Aida opera), however I'm far of being a musician, hence my opinion maybe irrelevant (simply I like very much his brilliant usage of winds and percussions).
Hamid. wrote: btw Im thankful of your search.
I hope, once at home, to remember about (don't blame me if I forget, I'm very absent-minded)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Holy cow. Lots of patience there man. I appreciate it.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
That may be seeing the 5! that's mine to compensate previous one. I never seen savitri appreciates anwser.
|
|
|
|