|
|
OK - first hit for "SDI resize view" on Google is this CodeProject article[^] - does that help?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi,,
I need this info.
I am interacting with MSMQ using VC++.
I am able to send messages. But i am not able to send really really large messages, really close to 4 MB but not more than that.
I guess the issue here is not with MSMQ, but to convert CString to wchar_t*.
I am using this code,
int length = data.GetLength(); // data is CString
USES_CONVERSION;
wchar_t *pwcharMessageBody = T2W(data.GetBuffer()); //stack overflow,This line fails for large string
data.ReleaseBuffer();
This is working for most cases. But not working for very large string size.
Any help will be great.
Thanks,
Saleem
|
|
|
|
|
Use MultiByteToWideChar with a large buffer.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
If you want to stick with the handy ATL conversion mechanisms, and you're using Visual Studio 2003, 2005 or 2008, check out this page[^] and use a CT2W object - you should just be able to add a C to your current T2W usage.
The Cx2y objects default to using an internal buffer for 64 byte strings, but allocate a buffer with malloc for larger strings, which is probably just what you want.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Thanks,,,but there seems to be a problem.
Code compiles fine.
But the wchar_t* is blank.
this is my code....
wchar_t *pwcharMessageBody = CT2W(data);
tried this too..
wchar_t *pwcharMessageBody = CT2W(data.GetBuffer());
No luck.
Any help will be great.
Saleem
|
|
|
|
|
Ah - that's because the CT2W object goes out of scope.
Try this:
CT2W pwcharMessageBody(data);>/pre>
A CT2W has a string conversion operator, it's just that now that the lifetime of pwcharMessageBody defines the conversion buffer lifetime.
<div class="ForumSig">Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p</div>
|
|
|
|
|
Actually it is a limit in MSMQ, so there is no problem in converting large char-arrays.
Sending MSMQ Messages larger than 4 Mb. causes exception
You either have to chop the message up in smaller pieces, or maybe perform compression before sending to MSMQ (Requires the opposite part is able to decompress the message again).
|
|
|
|
|
Hi there.
While using a component, I ma getting above mentioned error message.
Just FYI, I have included .lib file under Linker/Inputs/Additional Dep... section. Also, have copied .dll file amd have also added .h file under the project.
Any pointers/suggestions will be highly appretiated.
Thanks
Pankaj
|
|
|
|
|
I guess the error message in the subject line is not complete.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Here we go...
1>LoggingManager.obj : error LNK2019: unresolved external symbol "public: __thiscall CDataAccessManager::CDataAccessManager(class ATL::CStringT<wchar_t,class StrTraitMFC_DLL<wchar_t,class ATL::ChTraitsCRT<wchar_t> > >)" (??0CDataAccessManager@@QAE@V?$CStringT@_WV?$StrTraitMFC_DLL@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@@Z) referenced in function "private: __thiscall CLogger::CLogger(class ATL::CStringT<wchar_t,class StrTraitMFC_DLL<wchar_t,class ATL::ChTraitsCRT<wchar_t> > >)" (??0CLogger@@AAE@V?$CStringT@_WV?$StrTraitMFC_DLL@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@@Z)
1>E:\PankajB\DATALAYER\Debug\DATALAYER.exe : fatal error LNK1120: 1 unresolved externals
|
|
|
|
|
Is it possible that the component you are using was compiled using non-Unicode strings and you are using Unicode strings in your project?
If the header files just mentions CString, that could happen.
Try removing the 'UNICODE:-UNICODE' part from the pre-processor macros section of your project properties and rebuilding.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
You are creating an object of CDataAccessManager in the constructor of CLogger , but it cannot find the constructor that takes a CString as parameter.
Are you export CDataAccessManager as a class from a DLL?
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Yes. I have exported this class.
|
|
|
|
|
Are you sure the exe is using the latest lib file?
You probably added the constructor later and forgot to copy the lib file!
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Yes, brother. I have just created one. Let me create a new one.
One more point - I am using all the DEBUG version files. I dont this that makes any differenece. Will be back to you aftar testing new lib.....
|
|
|
|
|
Same problem...
|
|
|
|
|
Can you try a different constructor?
A default constructor preferable.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I just tried that...
Default constructor is working...but not any overloaded ones.
|
|
|
|
|
I believe you're the lib file that is being used by the exe is not the latest.
Please check the location from where the lib is accessed and replace it with the latest lib.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I have crossed checked it...I am sorry to say, its the latest one.
|
|
|
|
|
Are using the required Namespaces ? I believe you are missing it.
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
Try using dumpbin[^] (comes with Visual Studio) to see what exports your lib file does have. Try looking for constructors of the class you want - I still suspect there's symbol mismatch somewhere...
You'll need to open up a command prompt in your lib file's diectory and enter a command like
"c:\Program Files\Microsoft Visual Studio 9.0\vc\bin\dumpbin.exe" /exports your-lib-file's-name
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Got an error message "This application has failed to start because mspdb80.dll was notfound. Re-installing the application may fix this problem".
Any suggestions.
|
|
|
|
|
Nope - are you using an Express edition of Visual Studio 2008?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|