16,019,140 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 Visual Basic questions
View Javascript questions
View .NET 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 Praveen Kumar Katiyar (Top 5 by date)
Praveen Kumar Katiyar
13-Dec-19 3:28am
View
#ifdef BUILD_MY_DLL // this is defined in the DLL's project ONLY!!!
first line is not available in my (DLL's Project) header file. then I checked it, and it was defined (DLL's Project) in the Project Settings
Project Properties -> Configuration Properties -> C/C++ -> Prepreprocessor ->Prepreprocessor Definitions. (I am using VS2010 Ultimate).
Praveen Kumar Katiyar
12-Dec-19 9:37am
View
I did a full rebuild of all the targets. and copied the updated dll in the exe's folder, but no avail.
Praveen Kumar Katiyar
12-Dec-19 7:02am
View
Deleted
Here is some Header file let say 'MyDLLImports.h' which contains.
typedef struct _tagMYPERSON
{
WCHAR FName[MAX_NAME_LENGTH];
WCHAR LName[MAX_NAME_LENGTH];
int Age;
double Salary;
}MYPERSON;
extern "C" MARSHALDLL_API void __cdecl ModifyPersonStructArray(int nCount, MYPERSON* pPersonArr);
Now i include this in my Dialog class (where i need to call this). like below.
#include "MyDLLImports.h"
void CMFCClientDlg::OnBnClickedPersonArr()
{
// TODO: Add your control notification handler code here
int nCount = 4;
MYPERSON* prsnArr = new MYPERSON[nCount];
CString strTmp;
m_lstOutput.ResetContent ();
m_lstOutput.AddString(_T("Before Call ==>"));
for (int nI=0; nI<ncount ;="" ni++)
="" {
="" strtmp.format(_t("first="" name="" %d"),="" ni+1);
="" stringcchcopyw(prsnarr[ni].fname,="" max_name_length,="" strtmp);
="" strtmp.format(_t("last="" stringcchcopyw(prsnarr[ni].lname,="" prsnarr="" [ni].age="20" +="" (ni+="" 1)*2="" ;
="" [ni].salary="20000" 1)="" *="" 1000;
="" strtmp.format(_t("person="" %d="[(%s" %s,="" age="[%d]," salary="[%.2lf])]")," ni,="" [ni].fname,="" [ni].lname,="" [ni].age,="" [ni].salary);
="" m_lstoutput.addstring="" (strtmp);
="" }
=""
="" modifypersonstructarray(ncount,="" );
="" m_lstoutput.addstring(_t("after="" call="=">"));
for (int nI=0; nI
Praveen Kumar Katiyar
12-Dec-19 5:57am
View
thanks for the quick reply.
but, even changing the calling convention has no effect.
it is same.
Praveen Kumar Katiyar
3-Dec-19 9:20am
View
You saved my day, what a silly mistake.
Thanks a lot.