Click here to Skip to main content
15,886,067 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Repost Pin
Hamid_RT3-Jun-09 3:43
Hamid_RT3-Jun-09 3:43 
QuestionIDispatch COM Object - returning BSTR incorrectly Pin
Mike the Red3-Jun-09 1:15
Mike the Red3-Jun-09 1:15 
AnswerRe: IDispatch COM Object - returning BSTR incorrectly Pin
CPallini3-Jun-09 1:48
mveCPallini3-Jun-09 1:48 
GeneralRe: IDispatch COM Object - returning BSTR incorrectly Pin
Mike the Red3-Jun-09 2:09
Mike the Red3-Jun-09 2:09 
GeneralRe: IDispatch COM Object - returning BSTR incorrectly Pin
CPallini3-Jun-09 2:26
mveCPallini3-Jun-09 2:26 
GeneralRe: IDispatch COM Object - returning BSTR incorrectly Pin
Mike the Red3-Jun-09 2:39
Mike the Red3-Jun-09 2:39 
GeneralRe: IDispatch COM Object - returning BSTR incorrectly Pin
CPallini3-Jun-09 2:49
mveCPallini3-Jun-09 2:49 
AnswerRe: IDispatch COM Object - returning BSTR incorrectly Pin
Stuart Dootson3-Jun-09 2:51
professionalStuart Dootson3-Jun-09 2:51 
Mike the Red wrote:
TCHAR * tcPath = new TCHAR;


You're allocating one (ONE) character to hold the path - that probably won't be enough Smile | :) Try allocating tcPath like this:

TCHAR * tcPath = new TCHAR[MAX_PATH];


and deallocating it like this:

delete[] tcPath;


or even just declare it on the stack like this:

TCHAR tcPath[MAX_PATH];


and then you don't need to deallocate it....

Mike the Red wrote:
m_HR = OLESTR("SHGetFolderPath failed.");


Yeah, that's bad, m'kay? You should create BSTRs with SysAllocString[^]:

m_HR = ::SysAllocString(OLESTR("SHGetFolderPath failed."));


BSTRs aren't just a null-terminated string of OLECHARs.

Mike the Red wrote:
m_HR = bst.copy();


You could just use m_HR = bst.Detach(); and reduce the number of string copies you do.

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

AnswerFound It ! - Thanks Pallini, Stuart Pin
Mike the Red3-Jun-09 5:09
Mike the Red3-Jun-09 5:09 
QuestionOK! Look this project Pin
agetina3-Jun-09 1:06
agetina3-Jun-09 1:06 
AnswerRe: OK! Look this project Pin
CPallini3-Jun-09 1:41
mveCPallini3-Jun-09 1:41 
QuestionSwitch Pin
navneet19853-Jun-09 0:41
navneet19853-Jun-09 0:41 
AnswerRe: Switch Pin
«_Superman_»3-Jun-09 0:53
professional«_Superman_»3-Jun-09 0:53 
QuestionCFormView with icon style CListCtrl works fine on debug build, but not on release Pin
Sternocera2-Jun-09 23:26
Sternocera2-Jun-09 23:26 
AnswerRe: CFormView with icon style CListCtrl works fine on debug build, but not on release Pin
Sternocera2-Jun-09 23:56
Sternocera2-Jun-09 23:56 
QuestionMy app crash with no apparent reason? Pin
josip cagalj2-Jun-09 22:53
josip cagalj2-Jun-09 22:53 
AnswerRe: My app crash with no apparent reason? Pin
_AnsHUMAN_ 3-Jun-09 0:25
_AnsHUMAN_ 3-Jun-09 0:25 
GeneralRe: My app crash with no apparent reason? Pin
josip cagalj3-Jun-09 0:53
josip cagalj3-Jun-09 0:53 
GeneralRe: My app crash with no apparent reason? Pin
David Crow3-Jun-09 2:54
David Crow3-Jun-09 2:54 
GeneralRe: My app crash with no apparent reason? Pin
josip cagalj3-Jun-09 3:10
josip cagalj3-Jun-09 3:10 
QuestionTwo main methods? Pin
agetina2-Jun-09 22:37
agetina2-Jun-09 22:37 
AnswerRe: Two main methods? Pin
Cedric Moonen2-Jun-09 22:43
Cedric Moonen2-Jun-09 22:43 
QuestionRe: Two main methods? Pin
CPallini2-Jun-09 22:47
mveCPallini2-Jun-09 22:47 
AnswerRe: Two main methods? Pin
KarstenK2-Jun-09 22:57
mveKarstenK2-Jun-09 22:57 
AnswerRe: Two main methods? Pin
Rajesh R Subramanian2-Jun-09 22:58
professionalRajesh R Subramanian2-Jun-09 22:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.