Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I have learned more through this forum than I did on a two day course. Thanks to everyone for their help and other postings that I have found useful..."

Geography

Where in the world do Tek-Tips members come from?
VisualBasicHelp (Programmer)
9 Sep 05 15:58
I am trying to use a Merrant Version manager application through VB 6.
The .bas file which the version manager has,I have included as a module in my VB program.
So I am just calling the function.
The function is shown like the following in .bas file

Declare Function PvcsOpenArchive& Lib "VM32VBWRAP.DLL" Alias "_wPvcsOpenArchive@28" (filename As Any, workfile As Any, ByVal workfileLen&, archive As Any, ByVal archiveLen&, ByVal openFlags&, hArchive&)
'    fileName$,                ' I: Name of archive or workfile
'    workfile$,                ' O: Buffer reveiving name of workfile
'    ByVal workfileLen&,       ' I: Length of workfile buffer
'    archive$,                 ' O: Buffer reveiving name of archive
'    ByVal archiveLen&,        ' I: Length of archive buffer
'    ByVal openFlags&,         ' I: see below
'    hArchive&)                ' O: Returned archive handle

I am trying to call it like this -

Dim hPVCS As Long
Dim sBuffWorkfile As String
Dim sBuffArchive As String
Dim iStatus As Integer
Dim sFile, sWorkfile As String

sFile = "\\10.20.9.212\qivr_vm8\QIVR_Vault_Projects\archives\IVRS Projects (Vault)\Sample_Project\test.txt-arc"
sWorkfile = "C:\disha\test.txt"
Open sWorkfile For Input As #1
Open sFile For Input As #2
iStatus = PvcsOpenArchive(sFile, sBuffWorkfile, LOF(1), sBuffArchive, LOF(2), PVCS_OPEN_RDONLY, hPVCS)

In the documentation its said that if the function ran successfully it will return 0 otherwise if the file is not found it will return 2.
Using this function I should get a handle over the PVCS, so that I can use all the functions in it.
But I have tried all the option. Even though the file is there, its returning me 2.

In documentation they have given an example of C
It is like this

ARCHIVEHANDLE handle;
char workfile[256];
char archive[256];
int status;

/* open archive for update */

PvcsOpenArchive("foo.c_v", /*Name of archive or workfile */
           workfile,/* Buffer receiving name of workfile */
           (workfile),/*Length of workfile buffer */
           archive,   /*Buffer receiving name of archive */
sizeof(archive), /*Length of archive buffer */
PVCS_OPEN_UPDATE,/* open archive for modification */
&handle);/* Returned archive handle */
PvcsCloseArchive(handle)

I am trying to use the same in VB 6 with little different values.

I have tried to double up on the "\" but still its not working.

I have tried this one also but still not successful

Dim hPVCS As Long
Dim sBuffWorkfile As String * 256
Dim sBuffArchive As String * 256
Dim iStatus As Integer
Dim sFile, sWorkfile As String

sFile = "\\10.20.9.212\qivr_vm8\QIVR_Vault_Projects\archives\IVRS Projects (Vault)\Sample_Project\test.txt-arc"
iStatus = PvcsOpenArchive(sFile, sBuffWorkfile, Len(sBuffWorkfile), sBuffArchive, Len(sBuffArchive), PVCS_OPEN_RDONLY, hPVCS)

Can anybody please help me out
ashmont (Programmer)
26 Oct 05 14:48
Where did you get the VB wrapper dll - I can't see it in my installation of Merant.

Cheers,

Ashley Emery

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close