|
Hi All:
I have this function in VC DLL that I would like to call with VB but I am not sure how to declare it.
VC Function:
Syntax:
void _stdcall PlayRequest(
DWORD ClientHandle, //Input parameters
long OutputChannel, //Input parameters
DWORD PlayerHandle, //Input parameters
PlayerInitData SegmentInfo, //Structure; //Input parameters
OSDInitStruct DisplayInfo, //Structure; //Input parameters
PlaySpeedType PlaySpeed, //Input parameters
LONGLONG *pActualStart, //Output
LONGLONG *pActualEnd, //Output
VideoType *pTypeOfVideo, //Output
bool MOL, //Input
void *CMDReserved[20], //An array of pointers reserved for future
use. Should be NULL. // Input
void *RSTReserved[10], //An array of pointers reserved for future
use. Should be NULL.// Output
AOUResult *pResult //Output
);
PlayerInitData
A structure used to initialize the player.
Syntax:
typedef struct{
TCHAR LoggerIPAddress[40];
long TokenNumber;
long ChannelID;
LoggerTime StartTime;
LoggerTime EndTime;
long ChannelType;
}PlayerInitData;
LoggerTime
A structure used for Recorder time
Syntax:
typedef struct
{
long lDate;
long lTime;
}LoggerTime;
OSDInitStruct
A structure used to set the information displayed in the On-screen Display.
Syntax:
typedef struct {
COLORREF m_colorText; //Long
LOGFONT m_fontText; //Structure
TCHAR m_szStaticText[40];
DWORD m_dwOSDBitmap;
} OSDInitStruct;
/* Logical Font */
#define LF_FACESIZE 32
typedef struct tagLOGFONTA
{
LONG lfHeight;
LONG lfWidth;
LONG lfEscapement;
LONG lfOrientation;
LONG lfWeight;
BYTE lfItalic;
BYTE lfUnderline;
BYTE lfStrikeOut;
BYTE lfCharSet;
BYTE lfOutPrecision;
BYTE lfClipPrecision;
BYTE lfQuality;
BYTE lfPitchAndFamily;
CHAR lfFaceName[LF_FACESIZE];
} LOGFONTA, *PLOGFONTA, NEAR *NPLOGFONTA, FAR *LPLOGFONTA;
typedef struct tagLOGFONTW
{
LONG lfHeight;
LONG lfWidth;
LONG lfEscapement;
LONG lfOrientation;
LONG lfWeight;
BYTE lfItalic;
BYTE lfUnderline;
BYTE lfStrikeOut;
BYTE lfCharSet;
BYTE lfOutPrecision;
BYTE lfClipPrecision;
BYTE lfQuality;
BYTE lfPitchAndFamily;
WCHAR lfFaceName[LF_FACESIZE];
} LOGFONTW, *PLOGFONTW, NEAR *NPLOGFONTW, FAR *LPLOGFONTW;
#ifdef UNICODE
typedef LOGFONTW LOGFONT;
typedef PLOGFONTW PLOGFONT;
typedef NPLOGFONTW NPLOGFONT;
typedef LPLOGFONTW LPLOGFONT;
#else
typedef LOGFONTA LOGFONT;
typedef PLOGFONTA PLOGFONT;
typedef NPLOGFONTA NPLOGFONT;
typedef LPLOGFONTA LPLOGFONT;
#endif // UNICODE
Thanks
|
|
|
|
|
I have made vb app that uses ADO 2.1 for connecting to an Access 2000 database.
My app is working fine on every computer except One. As soon as the app connects to the database, it returns the
following error:
3706, Provider cannot be found. It may not be properly installed., ADODB.Connection
This computer has Win2k Pro SP4 / Access 2002 / MDAC 2.5 SP3 (I used Component Checker to find this out.)
The user of this computer is pretty sure that Win2k SP4 was run by the Administrator of the computer
so it is not a matter of privileges to access the drivers.
The Micosoft Access Driver (ODBCJT32.dll) version is same as on my computer, where the app is working fine.
I have tested my app on another computer that has Win2k Pro SP4 with MDAC 2.5 SP3...it works fine there.
I have successfuly tested my app on different Windows OSes from (9x to XP pro) with MDAC ranging from "UNKNOWN" (as the Component Checker put it) to 2.7 Sp1/RTM.
Unfortunately, the app is to be only used on this problematic computer.
If anybody has encountered such a problem or has any ideas on this, pls do reply.
Thanx in advance.
|
|
|
|
|
Dear.,
I hope that access2000 is not able to access thro vb. So, u have to convet the database to the lower version. There is an option for that in the access.
And then u make the connection b/w them. I hope its do good.
Perhaps u had any error yet, then select the project-> there reference and select the microsoft Activex dataobject 2.0 library.
Even After u had err then check the Data source name created is correct or not in the control pannel.
bye
Shanmuga Sundar.V
|
|
|
|
|
You might want to try reinstalling MDAC 2.5SP3 on the machine to see if this fixes the problem. You can get the older version from here[^].
RageInTheMachine9532
|
|
|
|
|
Hi Can I got example ho to setup newly opened socket
from VB . I need to set SO_LINGER = 1.
I can some one give me an example how to do it.
|
|
|
|
|
hi
There is an very good examples in the MSDN. Refer it
Shanmuga Sundar.V
|
|
|
|
|
I want to make an exe that runs in the background, and react when I call it with for example a filename. How do i make an exe to accept arguments and react on them?
|
|
|
|
|
In VB6, you can get the command line arguments from the Command variable.
In VB.NET, you can get them from the Microsoft.VisualBasic.Command() variable.
VB.NET docs on this are here[^].
Now, did you want to communicate with an already running instance of your app or is your app going to be running as a service?
RageInTheMachine9532
|
|
|
|
|
hi i am new in the database projects across network, now for eg if there are 10 client machines and a server and we have our access database on the server how can we connect the client to the databse ie the path would be???
|
|
|
|
|
You could use an ODBC data source, or you can use \\server_name\database_name.mdb
Free your mind...
|
|
|
|
|
hi,
i have the same problem with my project. i have an existing system which is a stand alone app. using ms access version 95, created in VB6.0... well because it's a bit old system. but is runs quit very well.
the system owners decided to make the app. run over the network, they have a total of 10 workstations on their office, all are running win 7 OS. 1 is for the primary admin and 4 is for staff. 5 are for users. the database is located at workstation 1, the other computers wants to access the database.
here is a sample code given to me:
Option Explicit
Dim Conn As New ADODB.Connection
Conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=\\IP\DIR\Data\masterFile.mdb"
as the patch
but i get an erro "User-Define not defined" on "Dim Conn As New ADODB.Connection"
am i missing something like an add-on or reference maybe, like in C# we used to add the reference for SQL connection.
do i need to install something?
|
|
|
|
|
How do I - in vb - write code that, when i rightcklick on a file i want to catch the path and the filename?
|
|
|
|
|
Are you talking about writing a Shell extension?
If so, you can't do it in VB6 without a little outside help from VC++. VB6 can't generate the required .DLL type to get this to work properly.
RageInTheMachine9532
|
|
|
|
|
Can anyone remember if there is a performance difference between using a recordset's Fields property or referencing it by default. I thought that I read something about them being different, but I can't find any documentation on it. Please see my example below.
Dim rs as ADODB.Recordset
dim sText as String
...
sText = rs.Fields("MY_TEXT")
OR
sText = rs("MY_TEXT")
I'm using VB6
|
|
|
|
|
There shouldn't be any performance difference at all. Are you experiencing any differences?
On top of that, using the default proprty is poor programming practice. It just makes your project more difficult to convert to VB.NET in the future.
RageInTheMachine9532
|
|
|
|
|
Thanks, I'm taking over a contract where the main goal is to clean up the code and make it more maintainable (and get it ready for .NET). I've been primarily working with Java and C++ for the last 4 or 5 years, so things are obviously different. Anyway, I've come across a lot of code that used default properties and before going in there and changin a bunch of stuff I wanted to make sure I had good reason. Thanks.
|
|
|
|
|
Hi
Does any one know how to read the description of an event using visual basic 6
Thanks;
|
|
|
|
|
The best way to do it is to use WMI. THere is an article on the technique here[^].
RageInTheMachine9532
|
|
|
|
|
I am using VB.NET and I have tried to find how to format a textbox to automatically change the first letter into a uppercase when someone types in the textbox. For example, I start typing in, food, when the first letter isnt capitalized I want it to automatically convert that first letter to uppercase, Food. Can anyone help?
Tonnie
|
|
|
|
|
How about setting up a TextChanged event handler and doing a test, if the text starts with a lower case letter then change it.
--Colin Mackay--
"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown)
|
|
|
|
|
My problem is how to test it, what code or codes do I use to test it, so it will automatically change the first char to an upper.
|
|
|
|
|
I see a couple of ways.
1. Don't bother with a test and just do it this way:
s = s.Substring(0,1).ToUpper() + s.Substring(1);
You may need to test the length and conditionally omit the + s.Substring(1)
2. Get the first character, cast it to a number and test the range. You'll need to find an ASCII table, because I can't remember the codes.
Option 1 may be better as the ToUpper() and ToLower() methods are culturally aware - If you have accented characters like áéíóú it will get them too, whereas with option 2 you need to find all possibilities yourself.
--Colin Mackay--
"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown)
|
|
|
|
|
This is great, only one small problem, I dont know how to create substrings to work correctly, any ideas?
|
|
|
|
|
Emmmmm... I have no idea what you mean....
You have a string you call the substring method on it and Robert is your father's brother.
--Colin Mackay--
"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown)
|
|
|
|
|
Sir i have done a vb ocx and i have to use it in Vc++.
Is there any tutorial or help avaialble for this.
Thanks in advance
|
|
|
|