Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » How to link to multiple DLLs
Re: How to link to multiple DLLs [message #43512 is a reply to message #43511] Thu, 14 August 2014 13:46 Go to previous messageGo to previous message
jerson is currently offline  jerson
Messages: 202
Registered: June 2010
Location: Bombay, India
Experienced Member

Hello Koldo

Thanks for your valuable input

Am I doing this DLI declaration right?

FN(WORD, capCreateCaptureWindowA, (String WindowName, int32 Style,int32 x, int32 y, int32 Width, int32 Height, int32 hParent, int32 ID));

/*
 * '--The capCreateCaptureWindow function creates a capture window--
 * Declare Function capCreateCaptureWindowA Lib "avicap32.dll" _
 *    (ByVal lpszWindowName As String, ByVal dwStyle As Integer, _
 *     ByVal x As Integer, ByVal y As Integer, ByVal nWidth As Integer, _
 *     ByVal nHeight As Short, ByVal hWnd As Integer, _
 *     ByVal nID As Integer) As Integer
 * 


I keep getting this error with the pointer under capCreateCaptureWindowA
c:/..../avicap32.dli:1:10: error: expected ')' before 'capCreateCaptureWindowA_type'
 FN(WORD, capCreateCaptureWindowA, (char *WindowName, long Style,long x, long y, long Width, long Height, long hParent, long ID));
          ^
C:\upp\uppsrc/Core/dli.h:42:23: note: in definition of macro 'FN_CN'
  typedef retval (call fn##_type) args; fn##_type *fn;


I have not used a header file and have put the following lines into my main.c
#define DLLFILENAME "avicap32.dll"
#define DLIMODULE   avicap32
#define DLIHEADER   <LM/avicap32.dli>
#define DLLCALL     LNPUBLIC
#include <Core/dli.h>


What am I doing wrong?

PS:
I think I figured it out somewhat. this is what compiled for me. However, I will still appreciate some insight into why this works. Why does FN_C work and not FN?
void	MyAppWindow::CapStart(void)
{
	HWND hwnd;

	hwnd = avicap32().capCreateCaptureWindowA("WebCam", WS_VISIBLE | WS_CHILD,0,0,640,480,picCapture.GetHWND(), 0);
}

In DLI file
FN_C(HWND, WINAPI, capCreateCaptureWindowA, 
	(const char *WindowName, UINT Style,UINT x, UINT y, UINT Width, UINT Height, HANDLE hParent, UINT ID))

[Updated on: Thu, 14 August 2014 14:45]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: problem with package locations
Next Topic: From XSD to XML
Goto Forum:
  


Current Time: Sat May 11 19:34:29 CEST 2024

Total time taken to generate the page: 0.03019 seconds