Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode HTML tags when pasting" checkbox before pasting anything inside the PRE block, and make sure "Ignore HTML tags in this message" check box is unchecked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question in one forum from another, unrelated forum (such as the lounge). It will be deleted.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
When answering a question please:
Read the question carefully
Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.
I just can't seem to get this right.
I have a Com Class written in VB.Net that brings up a form where users can enter information.
I have a delphi program that opens this class and it shows the form fine.
The problem I have is with events raised in the Com Class. It just does not get fired in delphi, although I can assign it to a procedure.
Hi Delphi gurus. I have had this com component registered on my machine, imported the component (xxxx_TLB got generated) and then I installed the component.
Is there any way that I could use the xxxx_TLB file after loading it dynamically and I don't have to install the component?? I mean all it contains is interface, dispinterface, CoClass and a class. Can not I instantiate this class dynamically?
Hello. I am trying to get cpu usage in delphi, using Performace Data Helper API. At the moment I know just two methods of getting it. One using Registry Interface and second PDH Interface and latter is easier than former. I am trying to use following code but it produces PDH_INVALID_ARGUMENT meaning either argument is missing or is invalid.
hStatus := PdhOpenQuery(Nil, 0, hQuery);
if hStatus <> ERROR_SUCCESS then// hStatus = PDH_INVALID_ARGUMENT
GetErrorMsg(hStatus, sErrorMsg); // sErrorMsg = 'argument is invalid or missing'
SO WHAT COULD BE WRONG? Thanks for any pointer.
May be irrelevant, but to give an idea that pdh variables are intialized with what values.
PdhOpenQuery : function( pReserved: Pointer;
dwUserData: DWORD; phQuery: PDH_HQUERY ): PDH_STATUS; stdcall;
// similarly the rest of the pdh functions here
DllHandle : THandle;
hStatus : PDH_STATUS;
DllHandle := LoadLibrary('pdh.dll');
if DllHandle <> 0thenbegin
PdhOpenQuery := GetProcAddress( DllHandle, 'PdhOpenQuery' );
// similarly the rest of the pdh functions here
Not sure your compiler is able to delay load dynamic library[^] which is another option. I haven't got chance to use this syntax though...
I would use the following to dynamically load the function.
type//definition is based on http://gr32ex.googlecode.com/svn/trunk/GR32Ex/Examples/DesktopSnow/GPSysHook/api/JwaPdh.pas
PDH_HQUERY = THANDLE;
PDH_STATUS = DWORD;
FuncPdhOpenQuery = function(szDataSource: LPCTSTR; dwUserData: DWORD_PTR;
var phQuery: PDH_HQUERY): PDH_STATUS; stdcall;
//and your function implementation would be:
if DllHandle > 0thenbegin
@PdhOpenQuery:= GetProcAddress(DllHandle, 'PdhOpenQueryW');//notice it's either W or A as stated in MSDN (http://msdn.microsoft.com/en-us/library/windows/desktop/aa372652(v=vs.85).aspx)
if (Assigned(PdhOpenQuery)) thenbegin
Res:= PdhOpenQuery(nil, 0, QueryHandle);
finallyif (DllHandle > 0)
Hello guys. I have this type library by importing and installing a COM component. Now I want to know two things. 1 - Each time my solution runs, the library gets loaded from default location C:\Users\xxxx\Documents\RAD Studio\9.0\Imports. What changes should I make so that it points and loads the library in my project folder. 2 - Now we know that if I reinstall the component, the library will be refreshed. Is there any way I could persist the changes made in the type library?
Thanks for any suggestions.
This world is going to explode due to international politics, SOON.