Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
N

Nguyen Minh Luan

@Nguyen Minh Luan
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • CStringArray problem
    N Nguyen Minh Luan

    Thanks for your help, I have tried to do as your comment, it is useful for me and is my need. Thank you very much.:)

    C / C++ / MFC help tutorial announcement

  • CStringArray problem
    N Nguyen Minh Luan

    Hi all, I have a trouble with CStringArray class, it is so difficult to me that I'd like to get help from you. My project has a DLL and a Exe file. In the DLL, threre is a function that used to get a list of strings, I use CStringArray to get the list strings. For example : __declspec( dllexport ) void GetCStringArr(CStringArray* pCStringArr) { CString cstrText; for (int i=0; i< 100;i++) { cstrText.Format("%d",i); pCStringArr->SetAtGrow(i,cstrText); } } In the application project, I call GetCStringArr function to get the list string, after calling GetCStringArr function, I have the needed list string and can access all strings in the list(CStringArray),everthing is OK but when I release the CStringArray object, my project has a exception : // m_ArrText is a CStringArray object, it is a member variant of //CTestCstringArrDlg class void CTestCstringArrDlg::OnGetButton() { GetCStringArr(&m_ArrText); for (int i=0;i<10;i++) { MessageBox(m_ArrText.GetAt(i)); } CTestCstringArrDlg.RemoveAll(); // This line code has exception } If I declare, use and release CStringArray variant in only application or only in Dll, everything is OK. I don't known why when I declare CStringArray in App but add it's item string in Dll, I can get all Item string in CStringArray but when I release CStringArray I alway have problem. Please help me to solve the problem!:(

    C / C++ / MFC help tutorial announcement
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups