|
I have a sample of win2k ddk's netcfg.I want to write the same program.But when I use there include file there are many errors.
d:\program files\ntddk\inc\rpcndr.h(880) : error C2146: syntax error : missing ';' before identifier 'MaxCount'
d:\program files\ntddk\inc\rpcndr.h(880) : error C2501: 'ULONG_PTR' : missing storage-class or type specifiers
d:\program files\ntddk\inc\rpcndr.h(880) : error C2501: 'MaxCount' : missing storage-class or type specifiers
what's wrong with the program.I have set the include file path in Vc.
Please help me.
Friends who have written ddk program help me please.
I want to ask a question.^_^
|
|
|
|
|
someone help me?
|
|
|
|
|
|
i installed the platform sdk.But there is the same question.What's wrong with it?
I want to ask a question.^_^
|
|
|
|
|
This may seem like and odd question, but why do most people prefix some of their variables with "m"? Does it help distinguish member variables or somthing of the sort?
|
|
|
|
|
|
Yes, the prefix helps the reader to recognize a member variable, one that isn't declared right there in the function. Other prefixes are g_ for globals (pretty common), and s_ for statics in a function (less common, although I use it). I've also seen one or two people use c_ for controls (such as a CListCtrl in a dialog) but I prefer using m_wnd for those.
--Mike--
Just released - RightClick-Encrypt v1.3 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
I like the c_ for control.
Always I use the first letter in lower case to show the type.
eg int m_iCount, CSize m_zBox, Point m_pDot. etc.
Especially in larger apps I find it makes Life easier with the intellisense stuff.
Regardz
Colin J Davies
Sonork ID 100.9197:Colin
You are the intrepid one, always willing to leap into the fray! A serious character flaw, I might add, but entertaining.
Said byRoger Wright about me.
|
|
|
|
|
|
Thank you.
|
|
|
|
|
|
hello everybody!
I have some trouble in freeing up the memory allocated for dialog items.
I have created the Gui screens using new and I use DestroyScreen to free my memory like this:
<br />
virtual void DestroyScreen(void) <br />
{<br />
if (m_pDlg->GetSafeHwnd())<br />
{<br />
delete m_pDlg;<br />
m_pDlg = NULL;<br />
}<br />
}<br /> }
I go through each dlg using this DestroyScreen function.
The returned warning is:
Warning: calling DestroyWindow in CDialog::~CDialog --
OnDestroy or PostNcDestroy in derived class will not be called.
Detected memory leaks!
Dumping objects ->
{3539} client block at 0x0081A330, subtype 0, 332 bytes long.
a CDialog object at $0081A330, 332 bytes long
Could anyone please help me with this one?
Thanks everyone!
Cheers,
wilche
|
|
|
|
|
|
You're destroying the dialog C++ object before the dialog window has been destroyed. Call m_pDlg->DestroyWindow() (assuming these are modeless) and call delete this; in each dialog's PostNCDestroy() .
--Mike--
Just released - RightClick-Encrypt v1.3 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
let me guess ur problem:
m_pDlg is a pointer to CDialog or its sub-class, say XDialog.
instances are not from XDialog, but its sub-class.
if my guess is correct, simply change distructor to 'virtual' one. that is all.
for MFC class, it is not necessary to call Destroy, MFC can do it itself.
includeh10
|
|
|
|
|
I'm learning VC++/MFC programming.
I want post data to a webserver by http protocol,but it is errors
Source followed:
CString strHeaders =_T("Content-Type: application/x-www-form-urlencoded");
// URL-encoded form variables -
// name = "John Doe", userid = "hithere", other = "P&Q"
CString strFormData = _T("t=abcd");
CInternetSession session;
CHttpConnection* pConnection =
session.GetHttpConnection(_T("http://127.0.0.1/test.asp"));
CHttpFile* pFile =
pConnection->OpenRequest(CHttpConnection::HTTP_VERB_POST,_T("http://127.0.0.1/test.asp"));
why the pFile is null?
6对9说:好好的,打什么倒立。0对8讲:胖就胖一点了,系什么腰带。7对2讲,别跪了,跪死了也不嫁给你。5对3讲:哼,再隆胸也是假的
|
|
|
|
|
lxdff wrote:
session.GetHttpConnection(_T("http://127.0.0.1/test.asp"));
GetHttpConnection requires a server, not a file. Try
session.GetHttpConnection(_T("127.0.0.1"));
Joel Lucsy (jjlucsy@ameritech.net)
|
|
|
|
|
|
I am very new at C++ programming and know little about it but I have been having complications with my errors stating that I have a undeclared identifier and I have no idea on how to correct this problem for a class assignment. Any information would be helpful.
Confused and lost
|
|
|
|
|
Posting code is a step in the right direction. I think you've mistyped a variable name and so it can't find the variable you're trying to use. For example
int nMyInt = 0;
int nMyOtherInt = nMyInnt * 2;
would generate this error, I believe.
But it's hard to tell without seeing the code and the error message.
Christian
We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum )
|
|
|
|
|
Hey coders... I am interested in building a MFC class Library but when I run it asks me:
Please specify the name of the executable to be used for the debug session.
It then offers a drop down. Listing Internet Explorer, Regsvr32.
I choose Regsvr32 because I believe that is the appropriate exe and click ok.
It then gives me a dialog warning saying no .dll was specified.
So I tried going C:\WINDOWS\System32\regsvr32.exe /i then the path of my solution but it still doesn't work.
I am also getting these errors in my output window.
LNK : warning LNK4089: all references to 'OLEAUT32.dll' discarded by /OPT:REF
LNK : warning LNK4089: all references to 'USER32.dll' discarded by /OPT:REF
If anyone could explain to me what I need to do or tell me where I could find a page that explains how to do this it would be greatly appreciated.
Thanks.
|
|
|
|
|
you can't "run" a library. a library isn't a program; it's just a collection of functions/classes.
it's prompting you for something to run.
if you want to test the functions in your library, write a program that uses those functions/classes and run it.
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
Hi,
If I create a dabase table in MS Access 2000, there is a single row with 2 cells:
1) Date (today) 2) Time (present time)
By using Date/Time value and activate Tool Adavance option & Refresh every 1 second (or some thing else) ... will it update these values?
If not, can some one help me to show how to update it (automatically) after trigger it?
I did try but if fail to updated itself!
Thanks,
ATC
|
|
|
|
|
Hi everyone been trying some weird stuff lately, I'm pretty new in the VC++ world....
What I want is to pass the structure name to the function?
This is what my actual code looks like (obviously it doesn't work, yet!)
CSlsuTable* pSLSU = new CSlsuTable(pDatabase); //CSlsuTable is my struct
ASSERT(pSLSU);
if (pSLSU)
if (BadFileTest(pSLSU,"su_key='I_CALC30'","slsu",pDatabase))
BOOL CGridApp::BadFileTest(struct cTableSet , CString strTableKey,CString strTableName,CDatabase* pDb) //I Can't get the struct
.
.
.
cTableSet* pTable = new cTableSet(pDb);
ASSERT(pTable);
if(pTable)
{
while(TRUE)
{
nret = IDNO;
pTable->m_strFilter.Empty();
pTable->m_strFilter = _T(strTableKey);
strSQL = _T("SELECT ");
strSQL += pTable->m_strDefaultSQL;
Does this make any sense at all? is it possible to do this someway?
|
|
|
|
|
Another thought I had on this ... is there anyway to pass the structure name as a string and then use that to declare my structure within the function? is this possible? Puzzled Emoticon
Ex:
BadFileTest("CSLSUtable","su_key='I_CALC30'","slsu",pDatabase)
BOOL CGridApp::BadFileTest(CString cTableSet , CString strTableKey,CString strTableName,CDatabase* pDb) //I Can't get the struct
.
.
.
cTableSet* pTable = new cTableSet(pDb);
ASSERT(pTable);
|
|
|
|