how to create dll for using by java

I have w.cpp file and also w.dll can be created when it is compiled.
So, I have written a program in C++ and can use w.dll in my program........

the problem is this.........

I want to write a program in java platform and have to use dll file
I can't use w.dll file because that is created for C++ program
that is not jni......

is there any easy way..........
how do I have to make changing about w.cpp which before is written........
w.cpp

HRESULT CWRAPIApp::OpenNdisDevice(WCHAR *pwDeviceName)
{
WCHAR wNdisDeviceName[DEVICE_LENGTH] = {0};
int wNameLength, i = 0;

if (!pwDeviceName)
{
m_hRes = E_POINTER;
}

else
{
wNameLength = 0;

for ( i = 0; i < DEVICE_LENGTH-1; i++ )
{
wNdisDeviceNameIdea = pwDeviceNameIdea;
wNameLength++;
}

wNdisDeviceNameIdea = L'\0';

if (!DeviceIoControl(m_hFileHandle,
IOCTL_NDISUIO_OPEN_DEVICE,
(LPVOID) &wNdisDeviceName[0],
sizeof(WCHAR)*wNameLength,
NULL,
0,
&m_dwBytesReturned,
NULL))
{
m_dwError = GetLastError();
PRINTF(("Could not open NDIS Device, error %d\n", m_dwError));
m_hRes = E_FAIL;
}
}

return m_hRes;

}

WRAPI HRESULT WRAPIOpenNdisDevice(WCHAR * pwDeviceName)
{ return theApp.OpenNdisDevice(pwDeviceName); }

[1656 byte] By [redcodes] at [2007-12-23]
# 1
Try www.sun.com...

nobugz at 2007-8-31 > top of Msdn Tech,Visual Studio Express Editions,Visual C++ 2005 Express Edition...