473,491 Members | 1,917 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Path della dll in uso!

Ciao a tutti, io ho una serie di progetti, ogni progetto ha le proprie
risorse (dialog,menu,string table).
Devo poter caricare le risorse di un progetto piuttosto che di un
altro dinamicamente. Ho una funzione LoadStringFromDLL(HINSTANCE
hInstance, int ID) che riceve l'hinstance e l'id e DOVREBBE usarli per
caricare la risorsa del progetto in esecuzione e la relativa stringa
nella string table.
Se io infatti creo "a mano" l'hinstance settando la dll, per esempio
HINSTANCE hInstance = "nomeprogetto.dll" e poi la passo insieme all'ID
alla funzione, tutto va per il meglio... Ma se provo a rendere tutto
ancora più dinamico, e non dover mettere manualmente il nome della dll
per ogni progetto, non funziona... Ho utilizzato queste due righe di
codice:

char Buffer[255];
GetModuleFileName((HMODULE)AfxGetInstanceHandle(), Buffer,255);

ma il path che mi restituisce è sempre quello del progetto di default,
da cui parte tutto... io vorrei una funzione che mi restituisse il
path del progetto attualmente in uso per poi passarlo alla funzione
LoadStringFromDLL... Mi spiego meglio... Se apro una dialog che non è
nel progetto base (ProgA) ma è nel progetto ProgB, vorrei poter
ricevere il path della dll del ProgB! Così da poterla passare alla
funzione e rendere tutto dinamico..

E' possibile fare tutto ciò? E' un po' che cerco, ma qui in azienda ho
molti siti bloccati compreso google, solo google gruppi è in white
list...

Chi mi aiuta?

May 11 '07 #1
2 1855
On 11 Maj, 12:45, revigli...@gmail.com wrote:
Ciao a tutti, io ho una serie di progetti, ogni progetto ha le proprie
risorse (dialog,menu,string table).
Please, this is an English newsgroup so restate your question in
English.

--
Erik Wikström

May 11 '07 #2
In message <11*********************@q75g2000hsh.googlegroups. com>, Erik
Wikström <er****@student.chalmers.sewrites
>On 11 Maj, 12:45, revigli...@gmail.com wrote:
>Ciao a tutti, io ho una serie di progetti, ogni progetto ha le proprie
risorse (dialog,menu,string table).

Please, this is an English newsgroup so restate your question in
English.
....and in the appropriate Microsoft newsgroup. Questions about DLLs,
dialogs, resources, menus, string tables etc. are off-topic here.

--
Richard Herring
May 11 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

31
3866
by: John Roth | last post by:
I'm adding a thread for comments on Gerrit Holl's pre-pep, which can be found here: http://tinyurl.com/2578q Frankly, I like the idea. It's about time that all of the file and directory stuff...
2
5152
by: Yachi | last post by:
devo passare all'SQL una stringa where che mi applichi delle modifiche in un range di data ma soltanto il martedi e il venerdì per esempio, opppure soltanto il giovedì e la domenica: Riporto un...
1
3833
by: Silvina | last post by:
hola! alguno sabe como uso el top en el mysql??? debo hacer la siguiente consulta y no le gusta al mysql SELECT TOP 10 * From ControlDeCaja WHERE CodUsuario = "xxx" alguien sabe? Gracias de...
34
3221
by: Reinhold Birkenfeld | last post by:
Hi, the arguments in the previous thread were convincing enough, so I made the Path class inherit from str/unicode again. It still can be found in CVS:...
1
2697
by: SAN CAZIANO | last post by:
selezionare il valore di una SELECT sapendo il testo che deve avere tra le sue opzioni <select name="combo"> <option>nome</option> <option>cognome</option> <option>prova</option>...
2
23359
by: Rob Cowie | last post by:
Hi, Given a string representing the path to a file, what is the best way to get at the filename? Does the OS module provide a function to parse the path? or is it acceptable to split the string...
1
5829
by: William Stacey [MVP] | last post by:
I need a bullet proof way to combine a root and a relative path to form a FQ rooted path (similar to a VDir in IIS). Path.Combine alone will not do the job in all cases. I also need to be sure...
8
11456
by: moondaddy | last post by:
I'm posting code for a user control ( FunctionConnectorSelector) below which has 3 content controls in it. each content control uses a style from a resource dictionary merged into the app.xaml...
0
7118
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7192
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6862
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7364
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4579
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3087
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
637
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
282
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.