15,916,452 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by inlandchris1 (Top 11 by date)
inlandchris1
21-May-21 3:57am
View
To get data out of a CString = (char *)strData.GetString();
inlandchris1
21-Oct-20 21:18pm
View
Gerry, thanks for the reply and accept all views. However, I only told a tiny bit of this story. I have been using C and C++ for 30 years because its the fastest high level language around next to assembler which is a low level language. My tiny code I put up is part of a 400,000 line count code which is used in a security environment. The hardware limitation is 127 card readers but I started this code from scratch that now has no limit on card readers and up to 4 billion cards. All this is possible because of C++. I need speed and C++ is only limited by the cpu clock speed. I have always been impressed with this language except for MFC. I needed a good looking GUI so 25 years ago, I chose MFC but the CRecordset sucks. This part of the code doesn’t not need CRecordsets because I am only writing to the transaction log and alarm logs. Doing the stored procedure is not writing, hence my trouble. Still pouring over the 7,000 page document but hoping someone has already cracked this problem. Again, thanks for the info.
inlandchris1
13-Aug-20 9:43am
View
Solution already solve #1 stupid, #2 stupid
inlandchris1
15-Jun-20 15:34pm
View
Rick, OK, finally found the trouble with reading invalid data from the Struct. I had an extra CString member that I didn't use or initialize. It apparently interfered with some of the other members being CString or char *, first time to see that but happily got it. Structs need to be tight, no slack, just thought I would pass it along.
inlandchris1
14-Jun-20 13:44pm
View
Thank you. MFC is almost gone since 2010 but I started this program in 2008 and now stuck with it for repairs and upgrades as Windows upgrades. Soon, no more upgrades on the program as MFC will be permanently gone. Too bad, many programs to this one employer; about 500,000 lines of old code.
inlandchris1
14-Jun-20 10:29am
View
I am curious why you don't like CString(). I have looked into string() and it doesn't have many functions as CString does but is there a performance problem?
inlandchris1
13-Jun-20 4:40am
View
I agree about the loop, just wanted to allocate more than I needed to prevent an overrun but really, all I need is 1 more on allocation.
inlandchris1
13-Jun-20 4:37am
View
Well thats a good idea but its the same energy to replace all the CStrings with chars[?], just a lot of work but that is my last resort, thanks for the reply
inlandchris1
13-Jun-20 4:34am
View
Yes, nice reply, its the compaction in the struct when the compiler is set for 8, like what I have been writing about. Selection is a choice of: 2,4,8,16. The default is 8 and makes the char worth 4, ok?
inlandchris1
13-Jun-20 0:43am
View
CMD_MAX is only a #define (was, now its "constexpr auto") of 15, meaning maximum of 15 for that array.
My guess the 108+4 is the CString because what is needed is 200 which is nvarchar(50) is a char of 50 long. A char is 4 bytes long time 50 == 200. So, the analyzed part of VS2019 did read the DB and found it could read up to 200. But why is the CString limited to 108+4?
inlandchris1
13-Jun-20 0:38am
View
Thank you for that. My impression was they were scheduled to be removed because of the virus scare. I will make a mental note.
Show More