Interfacing LabVIEW to the GetFileTime function in kernel32.dll

I am attempting to get the creation date/time of a file. The GetFileTime function inside kernel32.dll seems like a good choice. It requires a handle to the file, so I open the file, typecast the refnum to a U32 and pass the U32 to the Call Library function node. The outputs I expect are pointers to strings, so I use the C string pointer.
I am at a loss of why this doesn't work. I have my crude VI (LV7.0) attached.
Attachments:
Get_File_Times.zip ‏13 KB

Hi,
If you use GetFileTime, the handle has to be opened with:
HFILE OpenFile(
LPCSTR lpFileName, // file name
LPOFSTRUCT lpReOpenBuff, // file information
UINT uStyle // action and attributes
LV's file handle is not compatible!
Also, this function is tricky. lpCreationTime is not a pointer to a string,
but a pointer to a FILETIME structure. You should provide it with pointers
to clusters with two U32's in it. You can do this by making a cluster with
two integers in it, and wire it (three times) to the dll. The dll has to be
configured as "adapt to type".
You should convert the FILETIME structures to SYSTEMTIME's with:
BOOL FileTimeToSystemTime(
CONST FILETIME *lpFileTime, // file time to convert
LPSYSTEMTIME lpSystemTime
// receives system time
Regards,
Wiebe.
"Mark Borodkin" wrote in message
news:[email protected]..
> I am attempting to get the creation date/time of a file. The
> GetFileTime function inside kernel32.dll seems like a good choice. It
> requires a handle to the file, so I open the file, typecast the refnum
> to a U32 and pass the U32 to the Call Library function node. The
> outputs I expect are pointers to strings, so I use the C string
> pointer.
>
> I am at a loss of why this doesn't work. I have my crude VI (LV7.0)
> attached.

Similar Messages

  • Firefox.exe - entry point not found The Procedure entry point GetLogicalProcessorInformation could not be located in the dynamic link library Kernel32.dll

    Here's my problem, until yesterday my firefox browser is fine, unless sometimes when i playing games/app in facebook the plugin keep crashing but thats okay i can stop it and reload my firefox.
    But now everytime i try to open firefox it displaying the error massage:
    firefox.exe - entry point not found
    The Procedure entry point GetLogicalProcessorInformation could not be located in the dynamic link library Kernel32.dll
    I try to uninstall firefox, and reinstall again.
    i have to use internet explorer and torch browser, which don't fit me and make me in pain.
    i try to run in firefox safe mode, according to some suggestion here, but it wouldn't allow me to open Safe Mode (i even holding the Shift button when clicking on firefix icon)
    Can you guys help me in here?
    Iam using windows xp.
    Thank you so much in advance, GBU all :)

    hi, do you have service pack 3 installed on your xp computer?

  • The procedure entry point GetLogicalProcessor Information could not be located in the dynamic link library KERNEL32.dll

    When I installed CS6 trial version and started from start menu and clicked Adobe photoshop CS6, I get this message.
    The procedure entry point GetLogicalProcessor Information could not be located in the dynamic link library KERNEL32.dll
    How to resolve it?

    Either your OS is damaged, or doesn't meet the minimum requirements for Photoshop CS6.

  • The procedure entry point GetLogicalProcessorInformation could not be located in the dynamic link library KERNEL32.dll

    I tried to download Photoshop CS6, but when I tried to open it said "The procedure entry point GetLogicalProcessorInformation could not be located in the dynamic link library KERNEL32.dll." I dont know what to do HELP PLEASE!

    Branched this off to a new discussion.  Maza255 please make sure you meet the minimum system requirements for Photoshop CS6 - http://www.adobe.com/products/photoshop/tech-specs.html.

  • When trying to update flash..getting "procedure entry point setdiidirectoryw could not be located in the dynamic link library kernel32.dll"

    When trying to update flash..getting "procedure entry point setdiidirectoryw could not be located in the dynamic link library kernel32.dll"

    this is a mere adobe bug - they changed the installer & it wont support installation on windows 2000 system any longer. adobe doesn't seem as it is going to fix this bug, see [https://bugbase.adobe.com/index.cfm?event=bug&id=3120661].
    you might want to try this installation method provided by a 3rd-party-site: [http://www.ortwinpinke.de/en/2012/03/13/install-adobe-flash-player-11110262-and-later-under-windows-2000/]
    please note that mozilla firefox won't support the windows 2000 platform any longer after the release of version 12 of the browser & the system is no longer supported or kept up to date with security fixes by microsoft too. in order to keep your computer & personal information on it safe you may consider upgrading to a newer system.

  • How to invoke the exported function of odbc32.dll

    Hi,
    I am unable to find the dll (SQLAllocHandle.dll) in our system. Its mentioned that the ‘SQLAllocHandle’ is one of the exported function of odbc32.dll
    I want to find out how to invoke this exported function and make use of the same in our system?
    Regards,
    Jay

    Your question leads me to believe you're not sure what you're asking.
    SQLAllocHandle is an ODBC api call, and you use it in your ODBC API program, the same way you use other ODBC api calls.
    Here's an example of a simple ODBC API program that uses SQLAllocHandle.
    Hope it helps,
    Greg
    #include "windows.h"
    #include "stdio.h"
    #include "sql.h"
    #include "sqlext.h"
    void GetSQLError();
    #define checkforerrors if (rc!=SQL_SUCCESS){GetSQLError();exit(1);}
    static      HENV     henv;
    static      HDBC     hdbc;
    void main(int argc, char *argv[])
         SQLRETURN rc=0;
         SQLCHAR* uid="SCOTT";
         SQLCHAR* pwd="tiger";
         SQLCHAR* dsn="orcl32";
         rc = SQLAllocHandle(SQL_HANDLE_ENV,SQL_NULL_HANDLE,&henv);checkforerrors
         rc = SQLSetEnvAttr(henv,  SQL_ATTR_ODBC_VERSION,(SQLPOINTER)SQL_OV_ODBC3,0);checkforerrors
         rc = SQLAllocHandle(SQL_HANDLE_DBC, henv, &hdbc);checkforerrors
         rc = SQLConnect(hdbc, dsn, (SWORD)strlen(dsn), uid,(SWORD)strlen(uid),pwd,(SWORD)strlen(pwd));checkforerrors
         printf("connected\n");
         rc = SQLDisconnect(hdbc);checkforerrors
         rc = SQLFreeConnect(hdbc);checkforerrors
         rc = SQLFreeEnv(henv);checkforerrors
    void GetSQLError()
    long    llDbErrCd = 0;
    short   llRetMsgLen = 0;
    char    lszSqlErrMsg[255];
    char    lszSqlMsg[255];
    SQLError(henv,hdbc,0,(SQLCHAR*) lszSqlErrMsg,&llDbErrCd,(SQLCHAR*) lszSqlMsg,255,&llRetMsgLen);
    printf(lszSqlErrMsg);
    printf(lszSqlMsg);
    }

  • Interface labview with the test board to identify opamp pins automatically

    is it possible to interface LABVIEW to a test board in such a way that the input, output pins of an op amp (8, 10, 14, 16 pin opamps) are identified automatically when DUT is placed in the socket

    pratheek wrote:
    Thanks alot. pin numbers are variable. I need to test the functional and test parameters for 8, 10, 14, 16 pin opamps.
    The first thing you need to do is ensure that +VCC, -VCC, and GND are always connected to the correct pins.  I think the best way to do this is have preset wire options that you manually select with some switches (reduces the complexity of the LabVIEW controlled wire switching).
    pratheek wrote:
    The desired out put for my project is to check the functionality of the opamps
    I understand the end goal, but what you need for first specity is the test sequence.
    1. Identify In/Out pins & number of op-amps.  What is the sequence for this??? What voltages do you apply to the various pins and what is your desired outcome???  How do you identify each pin as in/out and whether they are for OpAmp1, OpAmp2, etc.  Since this sequence will inevitabely apply voltage to the output pins, make sure your test sequence doesn't damage the chips.
    2. After identfying each op-amp, what is the test sequence for evaluate its "functionality"??  Do you wish to evaluate the gain for various resistor combinations in an external circuit????
    3. Now with your test sequences outlined, you can finally begin on getting LabVIEW to implement these functions.  I'd use the DAQ digital outputs to a decoder (3-to-8 or 4-to-16).  Use the outputs of the decoder to control switches (these switches control the connections between a second DAQ and the test pins).  A third DAQ may even be necessary to control the selection of various test resistors.  Keep in mind that each of these switches will add resistance to the path so your evaluation must be made measuring the voltages at the op-amp pins (not using the sourced voltage values).  Planning the full measurement sequence and requirements before you start will not only help guide your program's development but it will tell you which DAQs are useful and how many you will need.
    This is quite an undertaking and we can't really provide any help on the LabVIEW end until you have a full write up of what you want to happen and how (step-by-step details).  Once you have that, start thinking about the sequence of events your code will have to follow to make it happen, then come back for guidance/help.

  • Has anyone interfaced LabVIEW to the Canon SDK for digital cameras?

    I'm trying to call the Canon SDK to remotely control a Canon powershot g2. The SDK is comprised of DLLs compiled from C code. I'm getting an error when calling the first routine to run the SDK apparently because it needs to allocate memory for itself and is failing. Any suggestions would be appreciated. TIA. David

    It is always tough to use a third party driver. I recommend first reading "Using External Code in LabVIEW" manual. You can find it by opening LabVIEW >> help >> seach the labview bookshelf. This launches a pdf. The manual will be hyperlinked there.
    The next thing to look for is a VB example in the SDK. Translating from VB to LabVIEW is straight forward and usually 1-1. Finally you may want to contact an Alliance member if you need this done fast. You can find the list at www.ni.com/alliance .

  • Application with a vi calling a function from kernel32.dll

    I have a Labview application which runs very well.
    I had add a vi using the functio GetSystemTime from the dll kernel32.dll. The vi calling the API function runs well. Then I tried to buil the application and it does'nt run anymore . A dialog box is opened : "access to a forbidden space memory. I don't understand.
    Does anyone have an idea?
    Thank you for your response.

    I have made at test with this function but it runs on my system.
    I have used LV 6.0.2 to LV 7.0 on a Win XP Prof. You can compare your solution with mine.
    The VI will run once when the application is called. You will see current time.
    Waldemar
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions
    Attachments:
    GetSystemTime.zip ‏23 KB

  • ViClose deadlocking in the DllMain function of a DLL

    Using NI-VISA 5.2 and 5.3, attempting to viClose a Resource Manager session when processing DLL_PROCESS_DETACH in the DLLMain function of an instrument driver DLL made in Visual Studio 2010 can cause a deadlock. This did not happen with earlier NI-VISA versions. Should it be possible to clean up any outstanding Resource Manager sessions when a DLL unloads?

    We found the same deadlock issue with viClose().
    Ie when viClose is executed from the C++ object destrcutor of a file scope object, ie viClose(ResourceManager) when processing DLLMain's DLL_PROCESS_DETACH, which calls Microsoft's C++ runtime object cleanup code, ie calls destructors.  
    The deadlock issue was discovered a few weeks ago when a customer upgraded to NI-488.2 version 3.1.1.  Luckily at the time, we were able to internally switch from using VISA to NI-488 via our hardware abstraction layer, and continue suporting the customer.  
    Today, I was able to track down the customer issue to NI-VISA 5.3 and create a work arround.  ie, creating a new DLL funciton and calling it from the application before the main application calls FreeLibrary() on the DLL.
    This issue doesn't happen with NI-VISA 5.2.

  • Error: The procedure entry point findactctxsectionstringw could not be located in the dynamic link library KERNEL32.dll

    I recently updated my antivirus to Norton 360 and also installed Internet Explorer 8. Now when I try to open firefox I get the error message that I have included below.
    == This happened ==
    Every time Firefox opened
    == After I updated to Norton 360 antivirus ==
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322)

    I have the same problem every time i start firefox. it even happens in safe mode. i am using windows 7 enterprise basic installation with no updates & kaspersky pure as anti virus. The laptop is a dell inspiron 1520 & also firefox keeps crashing due to problem with Adobe flash( i have updated flash & firefox to the latest version). Please help fix this problem!!

  • Keep getting error message: the procedure entry point RtlCaptureContext could not be located in the dynamic link library KERNEL32.dll

    The message above keeps popping up on the desktop. Sometimes I have 5 or 6 of those boxes on the screen. It happens all the time and it is when I am not on the web.

    Looks that RtlCaptureContext is not supported on the Windows 2000 platform, so you may have installed software that requires Windows XP as a minimum.
    See:
    * [[Troubleshooting extensions and themes]]
    * [[Troubleshooting plugins]]

  • The procedure entry point GetTickCount64 could not be located in the dynamic link library KERNEL32.dll in WinXP 32 bit.

    I recently re-installed WinXP, on a computer that had WinXP on it already. I am not a developer. Before re-installing the application worked fine. After, well I get this error after running this particular application. I used all of the same drivers as
    before when fixing video card, audio, and network driver errors. I don't know what I've done differently from any other time I've installed WinXP.

    >The thing I don't understand is why it worked on WinXP before but not now. It's the same, it was XP before, it's XP now.
    But as Pavel A tried to point out, were you using a different
    (earlier) version of the application before?
    Dave

  • I get the following error "The procedure entry point RtlCaptureContext could not be located in the dynamic link library KERNEL32.Dll" Please help. Windows 2000 sp4

    Firefox crashes frequently in Facebook.com.
    and the error written above happens often and I think they are related??

    That entry point is only available in Windows XP and later and not in Windows 2000.<br />
    *http://msdn.microsoft.com/en-us/library/ms680591%28v=vs.85%29.aspx
    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    * [[Troubleshooting plugins]]
    If it happens on Facebook then you can also try to remove gadgets from your Facebook page to see if one of them is causing it.

  • The procedure entry point EncodePointer could not be located in dynamic link library KERNEL32.dll

    Every time I open a program to update to service pack 1 I get the following message. (The procedure entry point EncodePointer could not be located in dynamic link library KERNEL32.dll)
    Any sugestions?

    I cannot download microsoft security essentials onto my computer because I received this error message, "he procedure entry point EncodePointer could not be located in the dynamic link library KERNEL32.dll."  Can you help me correct this problem?
    Hi Nick1943,
    Welcome to MSDN forum.
    Please check the workarounds in the following links to fix this issue:
    The
    Procedure entry point EncodePointer could not be located in the dynamic link library KERNAL32.dll
    ErrMsg: Procedure Entry Point Could Not Be Located
    Targeting Windows XP with C++ in Visual Studio 2012
    By the way,this forum is mainly to discuss and ask questions about
    Visual Studio Extensibility (VSX), using the Extension Manager, building VSIX containers for deployment, the Visual Studio SDK, Text Templates (T4), add-ins, macros, and more.
    I will move this peoblem to Off Topic.
    Thanks for your understanding.
    Best Regards,
    Jane.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • In po amount the dot and cama is exchanged

    hi masters, i m working on po. when i take the print preview of po then it exchange the cama and dot in amount field. means if i have to print 12,123.23 then it prints 12.123,23. but in me21n t.c. while creating po it shows correct. i have copied the

  • Phones broke worried!! need to know what s wrong!

    hi, i have the curve8520 on tmobile and i recently downloaded an app called KIK MESSENGER as everyone was raving on about it and then everyone said it could be a virus or it hacks into your phone, so i deleted it. Now thoough my screen went blank(whi

  • JSF Portlet with RichFaces implementation

    I am trying to build a JSF 1.1 portlet with RichFaces implementation. Although, the portlet gets displayed with out any errors. I do not see the RichFaces capabilities getting executed such as "A4J:support" tag is not doing an Ajax based form validat

  • Ap with one antenna

    Hi guys, any of you knows if thera are problem using Ap with only one antenna? do they work? drawbacks? thanks

  • JAX-WS Port address

    hi , Our Webservice implementation has deployed into http://wixt.wload.global:7806/mcfe/InvolvedPartyManagement. Webservice client code is reading this port address from WSDL file through the following API protected Service(URL wsdlDocumentLocation,