User Profile
Collapse
-
TestFn will populate some of the members of object a. -
Passing a object to a cpp function
I have a C# application.I need to pass a object say a of class A to a function in cpp.The cpp code is compiled to a dll file.
I need to dllimport and pass the object from c# to cpp where cpp changes the data members of this object and these changes need to be reflected in C#.
The class I need to pass to cpp function also contain objects of some other classes.
C#
[DllImport("My.d ll", EntryPoint... -
Deriving an ordinary class from a COM class
I have a COM class derived from a COM interface.I also need a socket class deriving from the same interface .Is it possible to do this? .I have derived this regular socket class from interface. -
You can disable optimization in the c/cpp tab of project settings of vcppLeave a comment:
-
Try the following.Perfo rm the following casting and see if it works.You should cast the farproc to char (__cdecl *)(void).
Hope it helps.
#include<stdio. h>
#include<window s.h>
int main(){
HANDLE ldll;
typedef char (*str)(void);
str Str;
ldll = LoadLibrary("my test.dll");
Str = (str)GetProcAdd ress(ldll, "str");
...Leave a comment:
-
try to use strtok to locate the words in a sentence and then swap the first letter and last letter of this word.Leave a comment:
-
Mobile apllications in Visual studio
Can we create mobile appplications in visual studio?
If so can somebody give me a useful link
Also how can i create a desktop shortcut while deploying applications (cab files) for windows ce in visual studio? -
-
I think you should use the following format.
func(&temp)
and
void fun(char **temp)
int main()
{
char *temp = (char *)malloc(sizeof ("Hello" + 1));
strcpy(temp, "Hello");
fun(&temp);
printf("temp = %s\n", temp);
return 0;
}
void fun(char **temp)
{
*temp = (char *)malloc(sizeof ("World"...Leave a comment:
-
-
static and dynamic linking a dll
How to link a dll statically?
How to link a dll dynamically?
When we use Loadlibrary , how are we linking the dll?
Can we load the same dll from different exes at the same time? -
CAB file creation in visual studio 2005
I have created a cab for windows CE using visula studio.Can anyone please help me to create a shortcut of my application in desktop.I was able to create shrtcut only in statrt menu.How to create shortcut in desktop using visual studio for windows CE -
use >> for cin.-----------------------------------------------------------------Leave a comment:
-
#pragma once is compiler dependent.#ifnd ef has no such problemLeave a comment:
-
-
Doubt regarding extern usage
Will this compile? I have 1 header file , and it is included in 2 source files.
1. What about re-declaration error ? (for arraysize... )
2. #include always = textual substitution ??? Or does it have some intelligence ?
my header file - consts.h:
const int arraysize = 15;
my sources file 1 - op1.cpp:
#include "consts.h"
char array1[arraysize];
my source... -
No activity results to display
Show More
Leave a comment: