Example #1
0
static void GetPluginNames()
{
    std::string csPluginsDir = STRINGIFY(EIDMW_PREFIX) + std::string("/lib/") +
                               EIDMW_PLUGINS_DIR + std::string("/");
    const char *csSearchFor = csPluginsDir.c_str();

    DIR *pDir = opendir(csSearchFor);
    // If pDir is NULL then the dir doesn't exist
    if(pDir != NULL)
    {
        struct dirent *pFile = readdir(pDir);
        for ( ; pFile != NULL; pFile = readdir(pDir))
        {
            // On Mac, card plugins are linked to the CAL.
            // So emulation plugins need to be used with the emulation CAL,
            // and 'normal' plugins need to be used with the 'normal' CAL.
#if defined CAL_EMULATION && defined __APPLE__
            if (strstr(pFile->d_name, "Emulation") != NULL)
                AddPluginName(pFile->d_name, csPluginsDir + pFile->d_name);
#else
            if (strstr(pFile->d_name, "Emulation") == NULL)
                AddPluginName(pFile->d_name, csPluginsDir + pFile->d_name);
#endif
        }

        closedir(pDir);
    }

    m_bPluginNamesOK = true;
}
static void GetPluginInfos()
{
	char csSystemDir[_MAX_PATH];
	GetSystemDirectoryA(csSystemDir, sizeof(csSystemDir) - 50);

	// E.g. "C:\WINDOWS\System32\siscardplugins\"
	std::string csPluginsDir = csSystemDir + std::string("\\siscardplugins\\");
	std::string strSearchFor = csPluginsDir + std::string("*.dll");
	const char *csSearchFor = strSearchFor.c_str();

    struct _finddata_t c_file;
	intptr_t hFile = _findfirst(csSearchFor, &c_file);
	if (hFile != -1)
	{
		int iFindRes;
		do
		{
			AddPluginName(c_file.name, csPluginsDir + c_file.name);

			iFindRes = _findnext(hFile, &c_file);
		}
		while (iFindRes == 0);

		_findclose(hFile);
	}

	m_bPluginInfosOK = true;
}
Example #3
0
static void GetPluginNames()
{
    char csSystemDir[_MAX_PATH];
    GetSystemDirectoryA(csSystemDir, sizeof(csSystemDir) - 50);

    // E.g. "C:\WINDOWS\System32\beidcardplugins\"
    std::string csPluginsDir = csSystemDir + std::string("\\") +
                               EIDMW_PLUGINS_DIR + std::string("\\");
    std::string strSearchFor = csPluginsDir + std::string("*.dll");
    const char *csSearchFor = strSearchFor.c_str();

    struct _finddata_t c_file;
    intptr_t hFile = _findfirst(csSearchFor, &c_file);
    if (hFile != -1)
    {
        int iFindRes;
        do
        {
            // On Windows, card plugins are linked to the CAL.
            // So emulation plugins need to be used with the emulation CAL,
            // and 'normal' plugins need to be used with the 'normal' CAL.
#ifdef CAL_EMULATION
            if (strstr(c_file.name, "Emulation") != NULL)
                AddPluginName(c_file.name, csPluginsDir + c_file.name);
#else
            if (strstr(c_file.name, "Emulation") == NULL)
                AddPluginName(c_file.name, csPluginsDir + c_file.name);
#endif
            iFindRes = _findnext(hFile, &c_file);
        }
        while (iFindRes == 0);

        _findclose(hFile);
    }

    m_bPluginNamesOK = true;
}
static void GetPluginInfos()
{
	std::string csPluginsDir = STRINGIFY(EIDMW_PREFIX) + std::string("/lib/siscardplugins/");
	const char *csSearchFor = csPluginsDir.c_str();

	DIR *pDir = opendir(csSearchFor);
	// If pDir is NULL then the dir doesn't exist
	if(pDir != NULL)
	{
		struct dirent *pFile = readdir(pDir);
		for ( ;pFile != NULL; pFile = readdir(pDir))
		{
			AddPluginName(pFile->d_name, csPluginsDir + pFile->d_name);
		}

		closedir(pDir);
	}

	m_bPluginInfosOK = true;
}