Hello,
I have created a C++ DLL project and I want to know please if I have to copy the whole project in the bin folder of my WinCC OA project?
Thanks,
API functions
- mkoller
- Posts:741
- Joined: Fri Sep 17, 2010 9:03 am
Re: API functions
In general: no
Plugins, which are loaded dynamically use only the compiled binary (.dll or .so)
But what did you implement ? Is it a CTRL extension ?
If so, check the README file which is copied into your project directory by one of our api/new* scripts
Plugins, which are loaded dynamically use only the compiled binary (.dll or .so)
But what did you implement ? Is it a CTRL extension ?
If so, check the README file which is copied into your project directory by one of our api/new* scripts
- najoua
- Posts:26
- Joined: Fri Nov 27, 2015 10:21 am
Re: API functions
Actually, I created a C++ solution with two projects: the first of type DLL and the second of type Console to be able to test the functions implemented in the DLL project. I did follow the steps described in the MSDN documentation. For now, my project contains only one simple function that gets a string as argument et returns it as output. I did test it in the Console application and it works. When I call my function in WinCC it gives me the following error in logviewer :
WCCOAui (1), 2015.12.08 12:22:55.238, CTRL, WARNING, 54, Unexpected state, SharedLib, userDefFunc, Error when calling GetBatiment in : Param?tre incorrect.
In the ReadMe file, it is written that the principal source file of my DLL project is MyDllProject.cpp. I don't see any file with extension .dll. Do I have to crate it somewhere?
Thanks a lot for your help,
WCCOAui (1), 2015.12.08 12:22:55.238, CTRL, WARNING, 54, Unexpected state, SharedLib, userDefFunc, Error when calling GetBatiment in : Param?tre incorrect.
In the ReadMe file, it is written that the principal source file of my DLL project is MyDllProject.cpp. I don't see any file with extension .dll. Do I have to crate it somewhere?
Thanks a lot for your help,
- najoua
- Posts:26
- Joined: Fri Nov 27, 2015 10:21 am
Re: API functions
I would like also to know if itis necessary to create some manager here?
I have visual studio in a another machine and the winnCC project in my local PC.
Regards,
I have visual studio in a another machine and the winnCC project in my local PC.
Regards,
- mkoller
- Posts:741
- Joined: Fri Sep 17, 2010 9:03 am
Re: API functions
Please explain what type of plugin you are trying to implement.
Did you check the README (or README.NT for windoze) in the api directory ?
Did you check the README (or README.NT for windoze) in the api directory ?
- najoua
- Posts:26
- Joined: Fri Nov 27, 2015 10:21 am
Re: API functions
Hello,
Yes thanks, I found the 2 README files. In fact, I am a beginner in WinCC OA. All what I have is a C++ project of type DLL and I am looking for how to link or use it in a WinCC project. While reading the files I haven't well understood if the visual studio 2013 and WinCC OA have to be installed on the same machine, is it the case?
Regards,
Yes thanks, I found the 2 README files. In fact, I am a beginner in WinCC OA. All what I have is a C++ project of type DLL and I am looking for how to link or use it in a WinCC project. While reading the files I haven't well understood if the visual studio 2013 and WinCC OA have to be installed on the same machine, is it the case?
Regards,
- mkoller
- Posts:741
- Joined: Fri Sep 17, 2010 9:03 am
Re: API functions
For developing, you would just need the api dir (and its subdirs) since this contains all the header files etc. and the bin dir which contains our libraries.
It would still be helpful to know what you are going to implement.
It would still be helpful to know what you are going to implement.
- najoua
- Posts:26
- Joined: Fri Nov 27, 2015 10:21 am
Re: API functions
Ok ! I have the "api" folder with all its subfolders in the path of WinCC and the "bin" folder empty in the path of my project.
The idea here is to implement a function to add a column to the AEScreen to show extra information about alerts. For example, I need to add a column to display the name of the building that contains equipment that trigger alerts. My function will get as input parameter the "dpid" and will search in a text file the corresponding name of the building for that "dpid" and return it as result.
I have tried to copy the files of "..\\api\\SampleTabUtil" in the bin and follow the steps described in the help to add user-defined column but it doesn't work. What should I add?
Thanks again for your help,
The idea here is to implement a function to add a column to the AEScreen to show extra information about alerts. For example, I need to add a column to display the name of the building that contains equipment that trigger alerts. My function will get as input parameter the "dpid" and will search in a text file the corresponding name of the building for that "dpid" and return it as result.
I have tried to copy the files of "..\\api\\SampleTabUtil" in the bin and follow the steps described in the help to add user-defined column but it doesn't work. What should I add?
Thanks again for your help,
- mkoller
- Posts:741
- Joined: Fri Sep 17, 2010 9:03 am
Re: API functions
ok, I see.
I would suggest you first try to compile the SampleTabUtil with the example functions inside.
If everything works, then we know you have set up everything correctly.
After that, we should check if your new code has some problems.
The compiled .dll should have the name TabUtilEx.dll and be placed in your project bin dir.
Then after configuring the AES, you should be able to use the functions inside to show values in new columns.
I would suggest you first try to compile the SampleTabUtil with the example functions inside.
If everything works, then we know you have set up everything correctly.
After that, we should check if your new code has some problems.
The compiled .dll should have the name TabUtilEx.dll and be placed in your project bin dir.
Then after configuring the AES, you should be able to use the functions inside to show values in new columns.
- najoua
- Posts:26
- Joined: Fri Nov 27, 2015 10:21 am
Re: API functions
I don't have a .dll file in the the api folder.
I have opened the solution SampleTabUtil in visual studio 2013 and compile it but I got errors:
'\\include\\winnt\\win32.h' : No such file or directory
I have opened the solution SampleTabUtil in visual studio 2013 and compile it but I got errors:
'\\include\\winnt\\win32.h' : No such file or directory