LoadLibrary Help
-
Hi, I am very new to VC++ and I got to work in VC++. My requirement is to call dll from an exe and I need to pass some value to the dll. I need to use that value in the dll. I am using LoadLibrary method to invoke the dll. But how to pass a value and how to use that value in the dll. Please help me. for example: LoadLibrary("test.dll", "display this text"); On load of dll (::OnInitDialog()): i want to display the message "dispay this text". How could I do this. Please help me out in this. Thanks in Advance,
AR Reddy
-
Hi, I am very new to VC++ and I got to work in VC++. My requirement is to call dll from an exe and I need to pass some value to the dll. I need to use that value in the dll. I am using LoadLibrary method to invoke the dll. But how to pass a value and how to use that value in the dll. Please help me. for example: LoadLibrary("test.dll", "display this text"); On load of dll (::OnInitDialog()): i want to display the message "dispay this text". How could I do this. Please help me out in this. Thanks in Advance,
AR Reddy
-
see GetProcAddress[^]
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition. Blaise Pascal
-
Thanks sashoalm, Now I got to know how to pass the value to a dll. But how to get that value from dll method. Please let me know. I am very poor in VC++. Thanks in advance,
AR Reddy
You first need to read some basic document about, see, for instance [^]. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Hi, I am very new to VC++ and I got to work in VC++. My requirement is to call dll from an exe and I need to pass some value to the dll. I need to use that value in the dll. I am using LoadLibrary method to invoke the dll. But how to pass a value and how to use that value in the dll. Please help me. for example: LoadLibrary("test.dll", "display this text"); On load of dll (::OnInitDialog()): i want to display the message "dispay this text". How could I do this. Please help me out in this. Thanks in Advance,
AR Reddy
-
Hi, I am very new to VC++ and I got to work in VC++. My requirement is to call dll from an exe and I need to pass some value to the dll. I need to use that value in the dll. I am using LoadLibrary method to invoke the dll. But how to pass a value and how to use that value in the dll. Please help me. for example: LoadLibrary("test.dll", "display this text"); On load of dll (::OnInitDialog()): i want to display the message "dispay this text". How could I do this. Please help me out in this. Thanks in Advance,
AR Reddy
AR Reddy wrote:
...and I need to pass some value to the dll.
There's no such concept. DLLs contain exported functions. You first have to load one of those functions (via
GetProcAddress()
) and then pass arguments to it."Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons