|
WendyS56 wrote: Do you mean if my application includes "string.h" and some other library header files include "string" or "CString" then there would be a conflict?
Or is it because there are multiple includes of the same header file (i.e. string.h)?
No - multiple includes shouldn't do that. What that message is saying is that your main object contains definitions for the string methods. I'm not sure why, but that's what the message is saying.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Thank you for clarifying things for me
When running dumpbin and looking at all the EXPORTS, basic_string is EXPORT'ed from lib4. I understand that to mean that these functions are made available by that library. Am I correct?
Would it make a difference to dynamically link my application to the libraries rather than statically linking to the .libs?
|
|
|
|
|
WendyS56 wrote: Would it make a difference to dynamically link my application to the libraries rather than statically linking to the .libs?
Could well do - with DLLs, you explicitly specify what is exported, whereas with static libraries, there's less control over what is visible from the library.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
My program compiles and links successfully now
I used dynamic linking to lib4. I then needed to remove the NODEFAULTLIB:"libcpmt.lib and NODEFAULTLIB:"libc.lib" from my application link options. (I still needed to have NODEFAULTLIB:"libcmt.lib")
Thank you for your help!
|
|
|
|
|
WendyS56 wrote: My program compiles and links successfully now
Excellent! That wasn't so difficult now, was it
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi,
May i know how can i get the screen resolution of the system and display a msgbox if the resolution is less than 1152*864....
|
|
|
|
|
|
I'm going to add more code into WM_PAINT hander, but I'm afraid to add to much to recude the performace.
I need a benchmark value to test if too much cpu tick is spended. Anybody has a value to share?
I know it depends on the different situation, but,.. I still like to see a estimated value.
|
|
|
|
|
|
Hi guys.
I have a fix for a edit box
I have a edit box (dialog box) which take string input ..........
The input at edit has a long limit i want to have finite entries in the edit box say string with 5 chars or number with 5 digits where i set the scope of the input string
|
|
|
|
|
How about sending it a EM_LIMITTEXT message?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
Hello Guys
Can anyone help me with "INSERT INTO" statement...
I need to insert variables into table(MSSQL) and my app. is in c++.
INSERT INTO TABLE_NAME (Col1,Col2,Col3)VALUES ('var1','58.5','15')
This is ok for constants but i cant made it work if i want to insert variables instead constants...
int var1;
int var2;
int var3;
INSERT INTO TABLE_NAME (Col1,Col2,Col3)VALUES (var1,var2,var3) ...?????
any ideas?
tahnks in advance, Komo

|
|
|
|
|
komofilms77 wrote: This is ok for constants but i cant made it work if i want to insert variables instead constants...
Can't you use string , sprintf() , or CString ?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
Hope, the example below can help
graph::addvalue(int nummer, CString typ, CString kstartrnummer,int zeile, int spalte, CString betrag, CString text, int r, int g, int b)
{
CString abfrage;
char strbetrag[100];
CString cnummer, czeile, cspalte, cr, cg, cb;
sprintf(strbetrag, "%i\0", nummer);
cnummer = strbetrag;
sprintf(strbetrag, "%i\0", zeile);
czeile = strbetrag;
sprintf(strbetrag, "%i\0", spalte);
cspalte = strbetrag;
sprintf(strbetrag, "%i\0", r);
cr = strbetrag;
sprintf(strbetrag, "%i\0", g);
cg = strbetrag;
sprintf(strbetrag, "%i\0", b);
cb = strbetrag;
text.Replace("'", "''");
abfrage = "INSERT INTO Graph (Nummer, Typ, Kstartrnummer, Zeile, Spalte, Text, Betrag, r, g, b) VALUES (" ;
abfrage = abfrage + cnummer + ", '" + typ + "', " + kstartrnummer + ", " + czeile;
abfrage = abfrage + ", " + cspalte + ", '" + text + "', ";
abfrage = abfrage + betrag + ", " + cr + ", " + cg + ", " + cb +")";
db.ExecuteSQL(abfrage);
}
Good luck, Gérard
|
|
|
|
|
i made it with sprintf and works great thanks guys 
|
|
|
|
|
BSTR strLoggedInUser=GetLoggedInUser();//is this line of code is correct or i use wcscpy here.
BSTR value=::SysAllocStringLen(L"",::SysStringLen(strLoggedInUser));
wcscpy(value,strLoggedInUser);
::SysFreeString(strLoggedInUser);
///////////////////////////////////////////////////////////////////////
HRESULT hr = pclsObj->Get(L"Manufacturer", 0, &vtProp, 0, 0);
BSTR strItemName =vtProp.vt==VT_NULL?L"-NA-":vtProp.bstrVal;// here too is this line of code is correct or i use wcscpy here.
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
BSTR value=::SysAllocString(strLoggedInUser);
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
|
i know how to copy bstr, but my problem is that when i assign
BSTR b=L"hello";
some where in code the value of b changes to " some garbage value".
but if i use wcscpy, the value of b doesn't change.
please read my question and answer me.
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
Take a look at: http://msdn.microsoft.com/en-us/library/ms221069.aspx[^]
It is clearly stated that asigning anything to a BSTR should be done using SysAllocString. So using wcscpy or a regular asignment operator (=) is wrong by definition.
You can try something like this (I assume GetLoggedInUser() returns a wchar *):
BSTR strLoggedInUser = ::SysAllocStringLen( GetLoggedInUser() );
::SysFreeString(strLoggedInUser);
|
|
|
|
|
Mogaambo wrote: BSTR b=L"hello";
That is bad.
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
[My articles]
|
|
|
|
|
BSTR b=SysAllocString(L"hello");
BSTR c=b;// here wcscpy should be used or it will work
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
Mogaambo wrote: BSTR b=SysAllocString(L"hello");
The above is fine.
Mogaambo wrote: BSTR c=b;// here wcscpy should be used or it will work
The above is bad.
Use, instead
BSTR c = SysAllocString(b);
Please read [^].
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
[My articles]
|
|
|
|
|
Hi All,
I need to create a plugin for adob photoshop. can any give me some idea from where i can get some example sorce code or can i found SDK to develop plugin with VC++.
please share your knowledge.
thanks
Bankey Khandelwal
|
|
|
|
|
See here[^] for downloading the SDK.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|