HanuAncutei.com - ARTA de a conversa!
Haine Dama designer roman

Bine ati venit ca musafir! ( Logare | Inregistrare )

 
Reply to this topicStart new topic
> Articol - Visual C++ - Mfc Extension Dll ..., Articol - Visual C++ - MFC Extension DLL
(cretze)
mesaj 2 Jun 2003, 02:37 PM
Mesaj #1





Guests






... deoarece am vazut ca mai sunt astfel de probleme, si cum nimeni nu se naste invatat, m-am gandit sa prezint putin mai detaliat modul in care se creeaza un MFC Extension DLL precum si modul in care acesta este apelat de catre un alt program ... pentru relizarea aplicatiilor de teste s-a folosit Visual C++ 6.0 ...
... pentru mai multe detalii legate de acest articol si nu numai, incercati si ACEST THREAD ...


Cretze ph34r.gif

Acest topic a fost editat de cretze: 2 Jun 2003, 03:09 PM
Go to the top of the page
 
+Quote Post
(cretze)
mesaj 2 Jun 2003, 02:39 PM
Mesaj #2





Guests






... part 1 / 1 ...
Descarca fisierul/ele
Fisier atasat  MFCExtensionDll.exe ( 0bytes ) Numar descarcari: 113
 
Go to the top of the page
 
+Quote Post
(cretze)
mesaj 2 Jun 2003, 02:40 PM
Mesaj #3





Guests






... desi am scanat arhiva inainte de a o posta, nu strica sa faci si voi acelasi lucru dupa download ...


Cretze ph34r.gif
Go to the top of the page
 
+Quote Post
Promo Contextual
mesaj 2 Jun 2003, 02:40 PM
Mesaj #


ContextuALL









Go to the top of the page
 
Quote Post
Zod
mesaj 13 Jun 2003, 02:25 PM
Mesaj #4


Haiduc
**

Grup: Musterii
Mesaje: 81
Inscris: 23 April 03
Forumist Nr.: 225



Cum am putea crea un DLL care sa exporte functii overloaded pe care sa le apelam din VB?
De ex:

int Func1(){}

int Func2(int n){}

iar din VB sa apelam fie prima, fie pe cea de-a doua functie, sub acelasi nume, dar cu alti parametri.


--------------------
The future starts from the past.
Go to the top of the page
 
+Quote Post
(cretze)
mesaj 16 Jun 2003, 08:42 AM
Mesaj #5





Guests






... as incepe prin a spune ca VB stiu foarte putin ... anyway, din cate stiu acest lucru este posibil in VB6 ( banuiesc ca la asta te refereai ) ... tot ce trebuie sa faci este sa importi DLL-ul respectiv cu LoadLibrary si sa apelezi functia respectiva urmata de parametrii necesari ( daca este cazul ) ...
... o alta solutie ( pe care eu o consider mai eleganta cool.gif ) decat cea de mai sus, este ca functionalitatile implementate in acel DLL normal sa fie vizibile ( exportabile ) prin intermediul interfetelor COM, asigurandu-se astfel o deschidere standard atat spre VB cat si spre limbaje scriptice cum ar fi VBScript, HTML sau multe alte limbaje care suporta COM/OLE ...


Cretze ph34r.gif

P.S. ... by the way, sorry de intarzierea raspunsului insa in week-end sunt offline ... blush.gif ...

Acest topic a fost editat de cretze: 16 Jun 2003, 09:01 AM
Go to the top of the page
 
+Quote Post
Zod
mesaj 16 Jun 2003, 09:20 AM
Mesaj #6


Haiduc
**

Grup: Musterii
Mesaje: 81
Inscris: 23 April 03
Forumist Nr.: 225



pai nu voiam sa folosesc COM, ci pur si simplu un dll simplu.
problema este ca daca declar acele 2 functii imi da eroare la linkeditare, cum ca simbolul nu e unic, lucru normal de altfel, pt ca sint 2 functii cu acelasi nume.
deci intrebarea mea este cum export eu cele 2 functii cu acelasi nume, dar cu parametri de apel diferiti?


--------------------
The future starts from the past.
Go to the top of the page
 
+Quote Post
moneytalks
mesaj 6 Aug 2003, 03:29 PM
Mesaj #7


Musteriu
*

Grup: Musterii
Mesaje: 6
Inscris: 6 August 03
Forumist Nr.: 554



QUOTE (Zod @ Jun 13 2003, 01:25 PM)
Cum am putea crea un DLL care sa exporte functii overloaded pe care sa le apelam din VB?
De ex:

int Func1(){}

int Func2(int n){}

iar din VB sa apelam fie prima, fie pe cea de-a doua functie, sub acelasi nume, dar cu alti parametri.

1. Nu stiu vb, deci nu te pot ajuta cum sa apelezi functiile in vb

2. Ce zice Microsoft:

CODE

You can export data, functions, classes, or class member functions from a DLL by using the __declspec(dllexport) keyword. If you use __declspec(dllexport), you do not need a .DEF file for exports.

To export functions, the __declspec(dllexport) keyword must appear to the left of the calling-convention keyword, if a keyword is specified. For example:

__declspec(dllexport) void __cdecl Function1(void);

To export all the public data members and member functions in a class, the keyword must appear to the left of the class name as follows:

class __declspec(dllexport) CExampleExport : public CObject
{ ... class definition ... };

When building your DLL, you typically create a header file that contains the function prototypes and/or classes you are exporting, and add the __declspec(dllexport) to the declarations in the header file. To make your code more readable, define a macro for __declspec(dllexport) and then use the macro with each symbol you are exporting:

#define DllExport   __declspec( dllexport )
Go to the top of the page
 
+Quote Post
Zod
mesaj 6 Aug 2003, 06:18 PM
Mesaj #8


Haiduc
**

Grup: Musterii
Mesaje: 81
Inscris: 23 April 03
Forumist Nr.: 225



Merge cu declararea facuta pt toata clasa. Intr-o clasa poti sa definiesti functii overloaded.
Dar acum am alta problema, VB nu vede simbolurile exportate, insa mai incerc.

Mersi pt sugestie!


--------------------
The future starts from the past.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

 



RSS Versiune Text-Only Data este acum: 26 April 2024 - 08:56 PM
Ceaiuri Medicinale Haine Dama Designer Roman