call function from one project to another in a single solution

  • Thread starter Thread starter Amit
  • Start date Start date
A

Amit

how can i call one project function in other project within a single
solution.

plz tell me the solution
 
Amit said:
how can i call one project function in other project within a single
solution.

The solution has nothing to do with whether you can call exported functions.

For the discussion below, I'm assuming unmanaged code.

Make the project containing the function you want to call a DLL, export that
function using __declspec(dllexport) or a .DEF file, and then do one of the
following in the other project:

1. Create a function pointer with the same signature as your exported
function, then use LoadLibrary and GetProcAddress to initialize that function
pointer to point to your exported function, OR

2. Import the function directly by using #include on a header file that
declares the exported function and link to the DLL's import library.

Hope this helps,
Sean
 
Amit said:
how can i call one project function in other project within a single
solution.

plz tell me the solution

What language.. and Managed or Unmanaged..???

Christopher
 
Back
Top